WinBatch® Technical Support Forum

All Things WinBatch => WinBatch => Topic started by: kle2 on February 19, 2025, 01:52:28 PM

Title: Get folder size
Post by: kle2 on February 19, 2025, 01:52:28 PM
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
 
Title: Re: Get folder size
Post by: td on February 19, 2025, 02:39:40 PM
Try DirSize.
https://docs.winbatch.com/mergedProjects/WindowsInterfaceLanguage/html/WILAK_D__038.htm (https://docs.winbatch.com/mergedProjects/WindowsInterfaceLanguage/html/WILAK_D__038.htm)
Title: Re: Get folder size
Post by: kle2 on February 20, 2025, 06:36:09 AM
Quote from: td on February 19, 2025, 02:39:40 PMTry DirSize.
https://docs.winbatch.com/mergedProjects/WindowsInterfaceLanguage/html/WILAK_D__038.htm (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
Title: Re: Get folder size
Post by: td on February 20, 2025, 07:22:24 AM
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.
Title: Re: Get folder size
Post by: kle2 on February 20, 2025, 11:25:53 AM
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.