samintz
Scott Mintz
- May
- 1,590
- 27
Here is a simple function to tell if a drive has been subst'ed. It works akin to @cdrom and @remote.
Code:
[C:\] function subst=`%@if[%@index["%@winapi[kernel32.dll,QueryDosDeviceW,"%1",BUFFER,1024]",\??\] != -1,1,0]`
[C:\] echo %@subst[c:]
0
[C:\] echo %@subst[p:]
1