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?

link|improve this question
feedback

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

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

closed as exact duplicate by kez, studiohack Mar 28 '11 at 2:17

This question covers exactly the same ground as earlier questions on this topic; its answers may be merged with another identical question. See the FAQ for guidance on how to improve it.

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.

link|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
feedback