0

Does anyone know if a VBscript command exists to run in Windows CE for determining the size of a drive and free space remaining on a drive?

All the commands like WinMGMTs or fileobject.free space doen't seem to be available in the Windows CE 5.0.

This must be a VBScript so I don't know how the link below will work or could convert. How can I determine free space on a Windows CE device?

Thanks!

Community
  • 1
  • 1
1234abcd
  • 1
  • 1

1 Answers1

0

FreeSpace property of a drive object from Scripting Runtime Library:

Dim fso, ddd
Set fso = CreateObject("Scripting.FileSystemObject")
Set ddd = fso.GetDrive( fso.GetDriveName("C:"))
WScript.Echo fso.GetDriveName("C:"), FormatNumber( ddd.FreeSpace/1024, 0)

or parse last line from dir /-c output which could look like

   15 Dir(s)     84849643520 bytes free

(I will delete my answer if it does not apply to Windows CE 5.0)

JosefZ
  • 28,460
  • 5
  • 44
  • 83