How to? Free command

  • This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.
Oct 18, 2008
263
1
#1
Hello -- I have a series of external drive (usb drive) that I connect to my system mounted at a
directory in c:\

The free command will tell me user / free space of a drive -- ie free C:

but I would like to get this info from the mount drive ... The only way I been able to do this is to create a drive letter to the mount drive via the subst command, then the "free" command works on the size of the usb drive --

Is there a way in tcc to issue free directly to a mounted drive?
 
#2
I mounted a 64GB WD external HD on "c:\wd" and removed its drive letter. These seems correct:
Code:
v:\> echo %@WMI[.,"SELECT FreeSpace FROM Win32_Volume WHERE Label = 'WD'"]
44953419776
 
v:\> echo %@WMI[.,"SELECT FreeSpace FROM Win32_Volume WHERE Caption = 'C:\\wd\\'"]
44953419776
 
v:\> echo %@WMI[.,"SELECT Capacity FROM Win32_Volume WHERE Caption = 'C:\\wd\\'"]
68722180096
I'm no WMI expert. The best way (for me, at least) to explore WMI and create things like the above is after experimenting with Microsoft's WMI Code Creator (free).