How to? Free command

Oct 18, 2008
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?
May 20, 2008
Syracuse, NY, USA
I mounted a 64GB WD external HD on "c:\wd" and removed its drive letter. These seems correct:
v:\> echo %@WMI[.,"SELECT FreeSpace FROM Win32_Volume WHERE Label = 'WD'"]
v:\> echo %@WMI[.,"SELECT FreeSpace FROM Win32_Volume WHERE Caption = 'C:\\wd\\'"]
v:\> echo %@WMI[.,"SELECT Capacity FROM Win32_Volume WHERE Caption = 'C:\\wd\\'"]

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).

Similar threads