How do I create a shortcut to a file that does not yet exist?
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.
Solution 1:
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
Sources:
1. Create a Shortcut to a non-existing folder in Windows XP
2. http://www.msfn.org/board/topic/70537-is-there-a-way-to-create-a-shortcut-without-the-source-file/
Solution 2:
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!