Check mapped network unit size

Asked

Viewed 228 times

1

I’m developing an app, and I need to check the free space on the mapped network drive, I can grab the contents of a file in my application directory, so I created a script to execute the command to check the free space on 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 switching the unit to c:, I have the expected return, but when I change to Z:, doesn’t work.

Or if there was another way to do it, I’m using .

1 answer

1


  • Returns 0, but if placed c:, returns the value. I’ve tried vlw before

  • @Strange David, I tested here on a mapped network and showed the size.

  • I tested on a new project, and got feedback, owe something on my project :/

  • 1

    is likely, have to go "panning" now

Browser other questions tagged

You are not signed in. Login or sign up in order to post.