I copy or rename a folder containing some files.
Then, in a command line window I type:
explorer /select,"<full-path-to-a-file-in-new-folder>"
The result is, the folder opens but the file isn't selected. Subsequent calls are fine, this happens only for newly created/renamed folders for the first time ever.
Is this a Windows bug? Is there a way around it?
I just ran into this same problem while trying to use the ShellExecuteEx()
to run the Explorer.exe with the /select, to pick a file. Explorer doesn't reliably select the file the first time. Maybe it's a bug... I found a few work arounds for it.
explorer.exe /select,"%~1"
using the full file name as parameter into the batch file.SHOpenFolderAndSelectItems()
function.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.