1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

How to? Free command

Discussion in 'Support' started by fpefpe, Jan 26, 2013.

  1. fpefpe

    Joined:
    Oct 18, 2008
    Messages:
    238
    Likes Received:
    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. vefatica

    Joined:
    May 20, 2008
    Messages:
    7,794
    Likes Received:
    29
    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).
     

Share This Page