Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have a folder scheme like (highly simplified version):

New Files
Tested Files

... and I'd like to have a shortcut in each folder from the "New Files" child folders, to the "Tested Files" child folder. But this folder may be moved around from time to time, which would break said shortcuts.

Is there a way to make a relative shortcut to each folder? I remember doing this in HTML where you could set a path, something along the lines of .../Files to go back to a parent and then into a new folder, but I'm unsure if this is something support under Windows shortcuts?

share|improve this question
Did you try ../Files, with two dots? I'm not running Windows but I think it may work. – Brian Z Sep 12 '13 at 14:53
That's the first thing i tried, thanks though. :( – Gary Morris Sep 12 '13 at 15:12
up vote 20 down vote accepted

You can use this utility: Relative.

It basically creates a shortcut to "explorer.exe" with the parameter of your relative path with a right click (same way as you create a normal shortcut).

Of course you can do this manually.
In your example you would create a shortcut in "New Files\Tools" to

%windir%\explorer.exe "..\..\Tested Files\Tools"

You can use the usual context-menu "New/Create shortcut" of Windows for this and typing above command in "Type the location of the item"-box.

share|improve this answer
I did read about that during my previous research, but i was hoping for a native solution within Explorer. This will be my backup plan though, cheers. – Gary Morris Sep 12 '13 at 15:13
By the way, will this relative path stay the same between systems also? Or will i need Relative to be installed if i move the folders/contents between different systems? – Gary Morris Sep 12 '13 at 15:16
"Relative" only makes the shortcut using the standard "%windir%\explorer.exe" so you don't need Relative on the different system. It would be the same as typing %windir%\explorer.exe before the relative path while making a standard shortcut. So if you do this manually you won't need Relative at all. (You just need to remember the command before your relative path) – Rik Sep 12 '13 at 16:16
Ah sorry, i misunderstood that part of your first reply, my bad! Thanks so much! – Gary Morris Sep 12 '13 at 17:00

One possible solution is use a one line batch file instead of a short cut to open whatever you wanted to open. The batch file will let you use relative paths inside itself and will have a working directory of whatever folder the batch file is placed in.

Another option is have your shortcut start cmd.exe instead with whatever you are launching then pass whatever it is you are launching in as a argument to cmd.exe

enter image description here

%COMSPEC% is a environment variable points to the command prompt by default.

/C causes the console to close itself after it executes the command.

share|improve this answer
Interesting method, thanks for the help! :) – Gary Morris Sep 12 '13 at 17:00

I'm using similar solution in a template that runs my web development environment (open project directory, open browser, run WAMP, run SCSS...)

enter image description here

I can pass arguments to my bat script and etc., this is cool. Make sure to put /c argument after cmd.exe

share|improve this answer

A shortcut can record it's location in a variable and call a command using the variable. For example, create the shortcut "Grandparent" with target:

%windir%\system32\cmd.exe /c set HERE="%CD%" && "C:\Here.bat"

Create the batch file "C:\Here.bat" with the single line:

@%windir%\explorer.exe /n,/select, %HERE%

Now, whatever folder Grandparent is in, when you click it, the parent of its parent folder opens. It even works with Grandparent in a root directory.

Your batch file could have used %HERE% in starting something other than explorer.exe. Or instead of Here.bat after the && in the shortcut target, you could call a program that makes use of %HERE%.

On my system Grandparent seems to work with & or &&.

share|improve this answer
&& only performs the next call if the previous call did not return an error, while & doesn't care. In this case, there should be no difference. – leewz Jun 8 at 2:02

If you leave the 'Start In' box empty in the properties of the Shortcut, the links be relative to the current working directory.

See also

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.