While doing some contract work I came across a custom written application with a hard coded value to an E: drive that was no longer present. There was plenty of space on the F: drive for files to be created (this was an automated nightly backup) to a set path on E:\somepath\somefile.
Intro stage left the subst.exe command from windows CLI.
As you can imagine it's to substitute and it works like this:
C:\>subst E: F:\customapp\
E:\>cd E:
E:\
E:\>dir
Volume in drive E is New Volume
Volume Serial Number is 0472-8727
Directory of E:\
03/15/2009 07:41 PM dir .
03/15/2009 07:41 PM dir ..
0 File(s) 0 bytes
2 Dir(s) 196,957,515,776 bytes free
These mappings are persistent, however if you wanna dump it use subst E: /D (or whatever your drive letter is).
You can also list mappings with "subst" on it's own
c:\>subst
e:\: => F:\customapp
Not rocket surgery, but pretty handy if you didn't know already :)
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment