windows XP explorer shortcuts with relative paths

D

dlandespub

So you try to make a relative path shortcut in explorer and it is
converted to an absolute path. Well here's a simple workaround I
figured out. Make a shortcut to cmd.exe which executes the start
command to open the current directory. Then set the cwd in the
shortcut properties.

Step-by-step:

Make a new shortcut to:
cmd.exe /c start .

Now right-click and get properties of the shortcut (shortcut tab).

The full shortcut path should have been set to this:
%windir%\system32\cmd.exe /c start .

Set the "Start in" directory (i.e. cwd) to be a relative path:
(Example for a shortcut on the Desktop)
...\SendTo

For kicks, click "Change Icon..." and set "Look for icons in this
file:" to:
%SystemRoot%\system32\SHELL32.dll

and press enter. The standard folder icon will probably be in the
lower right-hand corner.

Now you can copy this file and just change the "Start in:" directory
to make new relative shortcuts.

Hopefully this is useful,
-devin
 
D

dlandespub

So you try to make a relative path shortcut in explorer and it is
converted to an absolute path. Well here's a simple workaround I
figured out. Make a shortcut to cmd.exe which executes the start
command to open the current directory. Then set the cwd in the
shortcut properties.

Step-by-step:

Make a new shortcut to:
cmd.exe /c start .

Now right-click and get properties of the shortcut (shortcut tab).

The full shortcut path should have been set to this:
%windir%\system32\cmd.exe /c start .

Set the "Start in" directory (i.e. cwd) to be a relative path:
(Example for a shortcut on the Desktop)
..\SendTo

For kicks, click "Change Icon..." and set "Look for icons in this
file:" to:
%SystemRoot%\system32\SHELL32.dll

and press enter. The standard folder icon will probably be in the
lower right-hand corner.

Now you can copy this file and just change the "Start in:" directory
to make new relative shortcuts.

Hopefully this is useful,
-devin

Oops. A bug in my idea. Using relative paths in SendTo is always
relative to your home directory. You have to set your "Start In"
directory to empty, then put the path in the shortcut line like this:
%windir%\system32\cmd.exe /c start ..\..\Foo

-devin
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top