Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 227
  • Last Modified:

Get Folder or Directory Size with VB

I need to monitor Directory or Folder size of mapped drives, and write that information out to a file.  I don't need to select the folders or directory they can be hard coded into the script. (such as //editfs/directory/directory).  Any help will be appreciated.

R
0
rmangione
Asked:
rmangione
2 Solutions
 
EDDYKTCommented:
Try this

Sub ShowFolderSize(filespec)
    Dim fs, f, s
    Set fs = CreateObject("Scripting.FileSystemObject")
    Set f = fs.GetFolder(filespec)
    s = UCase(f.Name) & " uses " & f.Size & " bytes."
    MsgBox s, 0, "Folder Size Info"
End Sub
0
 
Richie_SimonettiIT OperationsCommented:
0
 
DanRollinsCommented:
Hi rmangione,
It appears that you have forgotten to close this question. I will ask Community Support to close it unless you finalize it within 7 days. I will ask a Community Support Moderator to:

    Split points between: EDDYKT and Richie_Simonetti

rmangione, if you think your question was not answered at all or if you need help, just post a new comment here; Community Support will help you.  DO NOT accept THIS comment as an answer.

EXPERTS: If you disagree with that recommendation, please post an explanatory comment.
==========
DanRollins -- EE database cleanup volunteer
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now