Opening shell folders from the command-prompt
Posted by jpluimers on 2021/09/09
I knew I could run shell:startup
and similar shortcuts from the Explorer address bar or the Windows-R “run” prompt.
First I learned that via [WayBack] tablet – How to set Google Chrome to automatically open up and in full screen – Super User.
Then via [WayBack] “shell:startup” – Google Search, I found [WayBack] Location of the Startup folder in Windows 10.
It took a while before I realised you can also run them from the command-prompt, batch-files or PowerShell scripts prepending them with start
:
start shell:startup
That one will open a new explorer window in the user startup folder from either the command-prompt, a batch file or PowerShell script..
The shell:
shortcuts can contain spaces. So for instance there is shell:common startup
that opens the common startup folder.
Starting it from the command prompt, batch file or PowerShell script is different: because of the spaces you will get the error on the right unless you add double quotes:
start "shell:common statartup"
All shell:
commands that you can run in the same way: double quotes work for both the ones requiring spaces and the simple ones nor requiring spaces.
Virtually each new Windows version (even most Windows 10 major builds) gets new shell:
commands.
A good source with an up-to-date and historically accurate of shell:
commands list is at [WayBack] Shell Commands to Access the Special Folders in Windows 10/8/7/Vista/XP » Winhelponline,
You can get the current list by recursively enumerating the HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\FolderDescriptions
registry key, which consists of a list of Explorer folder GUIDs having Name
, ParentFolder
and RelativePath
value names.
–jeroen
The error on the right copied as text gives you this:
[Window Title] shell:common [Content] Windows cannot find 'shell:common'. Make sure you typed the name correctly, and then try again. [OK]
Leave a Reply