- Nov
- 351
- 10
I have a simple alias:
alias freee=for %%A in (%%_ready) do free %%A
Works nicely, but if I have a substituted drive:
subst D: C:\PERSONAL
The output of the said command will display the free size of the C: drive twice:
Volume in drive C is PRINCIPAL Serial number is 2c4e:febc
36.702.134.272 bytes total disk space
36.085.678.080 bytes used
616.456.192 bytes free
98,3 % in use
Volume in drive D is PRINCIPAL Serial number is 2c4e:febc
36.702.134.272 bytes total disk space
36.085.678.080 bytes used
616.456.192 bytes free
98,3 % in use
Volume in drive F is FUENTES Serial number is 7446:3762
3.305.562.112 bytes total disk space
1.660.338.176 bytes used
1.645.223.936 bytes free
50,2 % in use
I've looked around, but I can't find a simple way to tell if a particular drive has been substituted. Ideally, my alias would be this:
alias freee=for %%A in (%%_ready) do if %%@substituted[%%A] == 1 free %%A
Yes, I know @subst[] is already taken.
alias freee=for %%A in (%%_ready) do free %%A
Works nicely, but if I have a substituted drive:
subst D: C:\PERSONAL
The output of the said command will display the free size of the C: drive twice:
Volume in drive C is PRINCIPAL Serial number is 2c4e:febc
36.702.134.272 bytes total disk space
36.085.678.080 bytes used
616.456.192 bytes free
98,3 % in use
Volume in drive D is PRINCIPAL Serial number is 2c4e:febc
36.702.134.272 bytes total disk space
36.085.678.080 bytes used
616.456.192 bytes free
98,3 % in use
Volume in drive F is FUENTES Serial number is 7446:3762
3.305.562.112 bytes total disk space
1.660.338.176 bytes used
1.645.223.936 bytes free
50,2 % in use
I've looked around, but I can't find a simple way to tell if a particular drive has been substituted. Ideally, my alias would be this:
alias freee=for %%A in (%%_ready) do if %%@substituted[%%A] == 1 free %%A
Yes, I know @subst[] is already taken.