Relative Path Shortcut in Windows

There is a Mobile Optimized version of this page (AMP). Open Mobile Version.

Windows technically does not support relative path shortcuts, however I say technically because there is a way to create relative path shortcuts that work on any Windows system, and it works by utilizing explorer.exe directly.

This method is much easier and quicker than the method’s already floating around on the internet, one such method involves creating a batch file and then converting it into an executable – this method works but is far more complex and time consuming.

In this post I will show you this easy method of creating relative shortcuts in windows using the shortcut wizard, follow the steps below:

  1. Right-click in the folder you wish to create a shortcut and navigate to “New > Shortcut”.
  2. In the Location field type “explorer.exe” and click “Next”.
  3. You will be asked for a name for the shortcut, put the name of the program or document you wish to open and click “Finish”.
  4. Now right-click on your new shortcut and go to “Properties”.
  5. Go to the shortcut tab, delete all text in the “Start in” field so that it is blank. This will ensure that when the shortcut is run it will look at the current folder first.
  6. Now modify the “Target” path so that it reads “%windir%\explorer.exe” followed by the relative path to your program and/or document “folder\myprogram.exe”. For example:
    %windir%\explorer.exe "KeePass Data\KeePass.exe"
  7. Congratulations! You now have a relative shortcut working in Windows!

Author: Dean Williams

I'm a Web Developer, Graphics Designer and Gamer, this is my personal site which provides PHP programming advice, hints and tips

  • LWC

    It's only good if you don't want a different folder as the "start in" folder.

    For example, I would like to run KeePass DataKeePass.exe test.kdb
    when is in c:foobartest.kdb and not in KeePass Data.
    Your method can't handle that.

  • Am I missing the point here? In this case cant you just use the full path? The whole reason for the blog post is to give the ability to use a relative folder path from the installation/running folder... KeePass does full paths already like any other software it is nothing special or difficult to warrant a blog post...