hi,
i want to map a directory (d:\Data) as a virtual drive (h: ), and when i run this in commandline, the drive is created till the reboot:
subst h: d:\Data
BUT, when i create a subst.bat file (so that i could add it to the startup list, so that the drive won't get lost with the reboot), the command wil start "cycling" and won't be launched properly. if you won't add the @echo off line, you can see the command cycling again and again, without being executed actually...
what am i doing wrong, what should be the exact syntax of the batch file, so that it *would* work?
i'm running win xp sp3.
thanks for the hints in advance!![]()
-
-
What exactly do you mean by "cycling"?
Do you have any other commands before subst in your subst.bat? If this is meant to be included on a startup cd/floppy do you have LASTDRIVE defined in your config.sys? -
It's interpreting your "subst" command (in the batch file) to mean to run the batch file subst.bat again (recursively) instead of running the built-in subst command.
To fix, just rename the batch file to anything else. -
That's it I'm off to bed! -
um... geez, if it's true, i'm thankful to you till the end of my life!!
(gonna try that)
edit: yes, it worked. i never thought that a filename could cause troublesthanks!
how to make subst command work in a batch file?
Discussion in 'Windows OS and Software' started by entropy.cz, Nov 3, 2008.