Get folder size

Started by kle2, February 19, 2025, 01:52:28 PM

Previous topic - Next topic

kle2

Hello everyone,

I would like to get the size of several remote Windows directories examle: \\server\d$\folder\subfolder1...n.  Is there a sample code out there that I can use?

Thank you,
kle2
 

td

"No one who sees a peregrine falcon fly can ever forget the beauty and thrill of that flight."
  - Dr. Tom Cade

kle2

Quote from: td on February 19, 2025, 02:39:40 PMTry DirSize.
https://docs.winbatch.com/mergedProjects/WindowsInterfaceLanguage/html/WILAK_D__038.htm


Wow a simple function!  Thanks, TD!

I am running into another issue.  Before checking the size of the remote folder.  I have to make a connection to the remote server with the below

AddExtender('wwwnt34i.dll',0,'wwwnt64i.dll'); 
wntAddDrive(@DEFAULT,@DEFAULT,"\\nihfiler\w$",@NONE,@FALSE)

I got the " Uninitialized variable, undefined function, or unquoted.  I am running Winbatch2016B, not sure if that extender is support...

Thanks,
kle2

td

You have likely misidentified the source of your error. When I execute your two lines I get an "Unrecognized network error" which is to be expected since I do not have a computer named "nihfiler" on my network. The network extender has been around since 2002 so your version of WinBatch is compatible with it.
"No one who sees a peregrine falcon fly can ever forget the beauty and thrill of that flight."
  - Dr. Tom Cade

kle2

Quote from: td on February 20, 2025, 07:22:24 AMYou have likely misidentified the source of your error. When I execute your two lines I get an "Unrecognized network error" which is to be expected since I do not have a computer named "nihfiler" on my network. The network extender has been around since 2002 so your version of WinBatch is compatible with it.
Thanks TD!  I will research more for the issue.