I'm developing an application, and I need to check the free space
on the mapped network drive, I can grab the contents of a file
in the directory of my application, then I created a script to execute the command
to check the free space in batch
:
unidade := 'Z:';
caminho := ExtractFileDir(Application.ExeName);
vCommand := 'fsutil volume diskfree '+unidade+' | find /i "livres disp" > '+caminho+'\unidade.txt';
WinExec(PChar('cmd /c "'+vCommand+'" '),SW_SHOWNORMAL);
With the code above, and changing the drive to c:
, I get the expected return, but when I change to Z:
, it does not work.
Or if you'd have another way to do this, I'm using windows-10 .