You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
explorer fails to open the correct path and select the child folder. Removing the /select, command line switch does open explorer displaying the correct folder's contents even when the path has spaces, however:
explorer.exe 'C:\Program Files\Common Files'
These behaviors occur in both WSL 1 and WSL 2.
Expected Behavior
I expect the Explorer /select, command line switch to work irrespective of whether the path has spaces in it.
Actual Behavior
Windows Explorer opens, but it does not open the specified path and select the child folder as instructed — instead it displays a default folder (D:\Documents in my case).
This is not related to WSL. This behavior occurs in command prompt as well. This is because CMD argument parsing is extremely convoluted, but the long story short is that if you replace the single quotes '' with double quotes "", it should work just fine.
Version
Microsoft Windows [Version 10.0.22000.282]
WSL Version
Kernel Version
5.10.60.1
Distro Version
Ubuntu 20.04
Other Software
No response
Repro Steps
This works on WSL 1 (tested on Microsoft Windows [Version 10.0.19043.1288]) and WSL 2:
explorer.exe /select,'C:\some\path'
It works because there are no spaces in the path. When spaces are introduced, e.g.
explorer.exe /select,'C:\Program Files\Common Files'
explorer fails to open the correct path and select the child folder. Removing the
/select,
command line switch does open explorer displaying the correct folder's contents even when the path has spaces, however:explorer.exe 'C:\Program Files\Common Files'
These behaviors occur in both WSL 1 and WSL 2.
Expected Behavior
I expect the Explorer
/select,
command line switch to work irrespective of whether the path has spaces in it.Actual Behavior
Windows Explorer opens, but it does not open the specified path and select the child folder as instructed — instead it displays a default folder (
D:\Documents
in my case).Possibly related issue: #2835
Diagnostic Logs
No response
The text was updated successfully, but these errors were encountered: