Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I am trying to create a shortcut in Windows pointing to a folder which does not yet exist, in a remote server to which I cannot write.

I tried creating any shortcut and overwriting the "Target" field, but when I press 'OK' I get an error because the target cannot be found. Laudable, but I'd like to override it.

Does anyone know how to do that?

I can program (Python) if necessary, but I was wondering if a simpler solution exists.

share|improve this question
1  
No. A simpler solution than Python does not exist :-) –  user3463 May 2 '11 at 15:51
add comment

2 Answers

up vote 1 down vote accepted

I don't think this is possible - I tried doing it but it didn't quite work as expected. Here's what I did:

  1. Download Shortcut from Optimum X.
  2. Use the following command to create a shortcut (at this stage C:\testfolder didn't exist):

    shortcut /F:example.lnk /A:C /T:C:\testfolder
    

    The lnk file is created and has all the correct properties, but doesn't work yet. I then created C:\testfolder and checked the shortcut. It pops up the Windows Open With dialogue but doesn't resolve properly as a shortcut.

  3. I ran the above command again and the lnk file was updated and now worked as a proper shortcut.

I doubt this will help in terms of a solution, but should at least hint towards this not being possible in a straightforward way.

share|improve this answer
add comment

One easy way to do it is to make a shortcut that uses Explorer instead.

For example, I just made a new shortcut and on Windows 7, it asks for "location of the item". I believe it is called Target on Windows XP.

Just put the following as the target/location:

explorer <desired-dir>

If someone runs the shortcut and the directory is not there, it will just open explorer and navigate to the default directory.

If the directory is there, it will open explorer and successfully go to the desired directory.

share|improve this answer
add comment

Your Answer

 
discard

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.