Hi,
Please can someone tell me if it's possible to use VBS to search through a folder and find the total size of the files in just that folder and not all of the subfolders?
I've tried using:
This displays each of the file sizes, but I want to know how to add these values together, rather than display them seperately? This way I can workout the total size of all the files.
Thanks in advance.
Greg
Please can someone tell me if it's possible to use VBS to search through a folder and find the total size of the files in just that folder and not all of the subfolders?
I've tried using:
Code:
dim fso, f, filesize1
Set fso = CreateObject("Scripting.FileSystemObject")
Set f = fso.GetFolder("S:\")
Set colFiles = F.Files
for each file in colfiles
filesize1=file.size
wscript.echo formatNumber((filesize1/1048576), 0) & " Mb"
next
Thanks in advance.
Greg