Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

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 would like to create a shortcut, the target of which does not exist (yet). However, as soon as I try to create it, Windows raises an error saying the specified target does not exist.

While I understand why Windows raises this error, I would like to know if there is a way to bypass it.

My file will be located on D:\MyScript.exe, so creating a fake file with this name will not work, since the character \ is forbidden for Windows filenames.

share|improve this question
Can you confirm you can create a shortcut to a folder on a CD? – Dave Jan 14 '13 at 14:44
up vote 1 down vote accepted

Shortcut from Optimumx can create shortcuts to non-existing targets.

You will probably run the following command

shortcut /F:example.lnk /A:C /T:D:\MyScript.exe

1. Create a Shortcut to a non-existing folder in Windows XP

share|improve this answer
Perfect, thanks :) – NNzz Jan 14 '13 at 15:45

IMO, there is only 1 way, and that is a simple hack.

Create a new file (like a text file), call it the eventual file name with the extension. Of course this file won't work, but Windows will reference it. Then, when you have the real file, just copy it over the top of your dummy file!

share|improve this answer
The problem is that my file will be located on D: (CD Reader), so creating a file called D:\myScript.exe will raise the following error : a filename cannot contain \ – NNzz Jan 14 '13 at 14:34
...Well, to be honest @NNzz I think your OP should have stated that since that's a major part of the question. Please edit your post – Dave Jan 14 '13 at 14:36
I edited my post. – NNzz Jan 14 '13 at 14:38
HA This worked perfect for what I needed! Clever lol – Alex K Jan 29 '15 at 22:35

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .