Folder size scripting help

  • Thread starter Thread starter Divyesh Raithatha
  • Start date Start date
D

Divyesh Raithatha

Hello I have a script that gets the folder size and
outputs it into a message box. Instead of outputting this
into a message box, I would like to output it into a
running excel spreadsheet with date and time. Any ideas?

option explicit
dim f, fso, size, drives, drive

f = "C:\WINNT"

' "set" a reference to the filesystem object
set fso = createobject("Scripting.FileSystemObject")

' now get the bytes of folder f and hang onto it
size = fso.GetFolder(f).Size

' echo it out
wscript.echo "Folder size:", size

Msgbox "The size of the folder " &f & " is: " &size & "
bytes"
 
Back
Top