Welcome!

By registering with us, you'll be able to discuss, share and exchange private messages with other members of our community.

SignUp Now!

How to? Free command

Oct
356
2
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?
 
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).
 

Similar threads

Back
Top