Customize Your Shortcuts to Folders
In Windows, you can create a shortcut to a folder (for example, by right-click and dragging the folder from the Windows Explorer onto the desktop and selecting create shortcut here). Then, when you double-click on the shortcut, Explorer opens back up and displays the contents of that folder. There are four default characteristics when this happens:
1. It will open a single pane window (no Explorer bar).
2. It will allow the user to navigate out of the folder (i.e. to the folder is parent and beyond).
3. The default is for none of the items in a folder to yet be selected.
4. If there is already an open Explorer window displaying that folder, then the operating system will switch to that existing view, as opposed to opening a new one.
All of these behaviors can be customized.
The first step is to convert the shortcut target from implicitly invoking the Explorer to explicitly invoking it. If you examine the properties of a folder shortcut, as described above (right-click and select Properties), you’d see that the Target field is the name of the folder.
Normally, for a Windows shortcut, the target is the name of a program to execute, but in this case it is just a folder name. When Windows sees that it is just a folder name, it assumes that you really want to open the Explorer, passing it the name of that folder. In other words, having a target of just SomeFolder is the equivalent of a target that says %windir%\explorer.exe SomeFolder. (The %windir% is automatically replaced with wherever Windows is installed.) So, click inside the target field and paste %windir%\explorer.exe (without the quotes, but with the trailing space) in front of the folder name.
The next step is to add certain “command-line switches that Windows Explorer understands. These switches are as follows:
. /n forces it to open a new window, even if it duplicates a window that is already open.
. /e uses Windows Explorer view (multi-paned).
. /root,X restricts Explorer to showing only the contents of file folder X (and its sub-folders).
. /select,Y automatically selects Y (either a file or folder).
These switches can be used in any combination, in any order. To use multiple switches, separate them with commas (but no spaces). for example, a target of %windir%\explorer.exe /n,/e,c:\temp\demo tells Explorer to open a new window to show the contents of C:\temp\demo, even if there is already a window open on that folder, and to make the Explorer bar visible. The next example uses all four switches:
/n,/e,/root,c:temp,/select,c:temp\demo\quick.txt
Note: The /root switch has no effect if the user has admin privileges.
1. It will open a single pane window (no Explorer bar).
2. It will allow the user to navigate out of the folder (i.e. to the folder is parent and beyond).
3. The default is for none of the items in a folder to yet be selected.
4. If there is already an open Explorer window displaying that folder, then the operating system will switch to that existing view, as opposed to opening a new one.
All of these behaviors can be customized.
The first step is to convert the shortcut target from implicitly invoking the Explorer to explicitly invoking it. If you examine the properties of a folder shortcut, as described above (right-click and select Properties), you’d see that the Target field is the name of the folder.
Normally, for a Windows shortcut, the target is the name of a program to execute, but in this case it is just a folder name. When Windows sees that it is just a folder name, it assumes that you really want to open the Explorer, passing it the name of that folder. In other words, having a target of just SomeFolder is the equivalent of a target that says %windir%\explorer.exe SomeFolder. (The %windir% is automatically replaced with wherever Windows is installed.) So, click inside the target field and paste %windir%\explorer.exe (without the quotes, but with the trailing space) in front of the folder name.
The next step is to add certain “command-line switches that Windows Explorer understands. These switches are as follows:
. /n forces it to open a new window, even if it duplicates a window that is already open.
. /e uses Windows Explorer view (multi-paned).
. /root,X restricts Explorer to showing only the contents of file folder X (and its sub-folders).
. /select,Y automatically selects Y (either a file or folder).
These switches can be used in any combination, in any order. To use multiple switches, separate them with commas (but no spaces). for example, a target of %windir%\explorer.exe /n,/e,c:\temp\demo tells Explorer to open a new window to show the contents of C:\temp\demo, even if there is already a window open on that folder, and to make the Explorer bar visible. The next example uses all four switches:
/n,/e,/root,c:temp,/select,c:temp\demo\quick.txt
Note: The /root switch has no effect if the user has admin privileges.
Comments
Post a Comment