Folder size scripting help

  • Thread starter Divyesh Raithatha
  • 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"
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top