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.

Possible Duplicate:
How to make SUBST mapping persistent across reboots?

I type the following command in order to create link between the Z: directory to the C:\DIR1\DIR2\DIR3\final_dir directory

  Subst  Z: C:\DIR1\DIR2\DIR3\final_dir

The problem is that after reboot the Z: directory is deleted.

My question is: how do I fix that to get the Z: link directory to persist after a reboot?

share|improve this question
add comment

migrated from stackoverflow.com Mar 27 '11 at 19:55

This question came from our site for professional and enthusiast programmers.

marked as duplicate by Kez, studiohack Mar 28 '11 at 2:17

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

1 Answer

Z: is a drive, not a directory.

To answer your question, subst drives are inherently transient.
You need to run that command every time you reboot.

You can do that by putting it in a .bat fil in the Startup directory.

share|improve this answer
    
Is it not the "root directory?" –  FreeAsInBeer Mar 27 '11 at 20:18
1  
Every drive has a root directory - the \ directory in the drive. Z: is a drive; its root directory is Z:\ . –  SLaks Mar 27 '11 at 20:19
add comment