Solved

Directory/folder utility

Posted on 2007-04-11
3
157 Views
Last Modified: 2010-04-18
Is there a utility out there that can go through a drive/directories and list the name of directories, the total size of the directories and other attribute such as last modified or even what type files are within the directories, etc?
0
Comment
Question by:bigd563
3 Comments
 
LVL 30

Expert Comment

by:LauraEHunterMVP
ID: 18890289
Take a look at DumpSec (www.somarsoft.com), a utility which we often recommend for requests like this one.

You can also use your own VBScripts to dump out the information you're looking for; take a look at the sample scripts on the Technet Script Repository to get you started: http://www.microsoft.com/technet/scriptcenter/scripts/default.mspx?mfr=true
0
 
LVL 67

Expert Comment

by:sirbounty
ID: 18890300

Hello bigd563,
Something like this will do it...


'FindAllFiles.vbs
Dim objFSO : Set objFSO = CreateObject("Scripting.FileSystemObject")
Dim objOutput:Set objOutputFile = objFSO.CreateTextFile("C:\Output.log")
Dim dtOld

strSourceFolder = "C:\Testing" 'starting folder...will recurse downward from here

ProcessFolder objFSO.GetFolder(strSourceFolder)

With objOutput
  .WriteLine
  .WriteLine "Process completed at " & Now
  .WriteLine "==========================="
  .Close
End With

Set objOutputFile = Nothing
Set objFSO = Nothing
wscript.quit


Sub ProcessFolder(strSource)
  ProcessFiles strSource
  For Each fld In strSource.SubFolders
    ProcessFolder fld
  Next
End Sub

Sub ProcessFiles(strSrc)
  For Each file In strSrc.Files
    objOutput.WriteLine objFSO.GetExtensionName(file.name) & "," & file & "," & file.size & "," & file.datecreated & "," & file.datelastmodified & "," & file.datelastaccessed
  End If
  Next
End Sub

~sirbounty
0
 
LVL 70

Accepted Solution

by:
KCTS earned 500 total points
ID: 18890662
0

Featured Post

The Eight Noble Truths of Backup and Recovery

How can IT departments tackle the challenges of a Big Data world? This white paper provides a roadmap to success and helps companies ensure that all their data is safe and secure, no matter if it resides on-premise with physical or virtual machines or in the cloud.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Organizations create, modify, and maintain huge amounts of data to help their businesses earn money and generally function.  Typically every network user within an organization has a bit of disk space to store in process items and personal files.   …
Recently, I had the need to build a standalone system to run a point-of-sale system. I’m running this on a low-voltage Atom processor, so I wanted a light-weight operating system, but still needed Windows. I chose to use Microsoft Windows Server 200…
This Micro Tutorial will teach you how to censor certain areas of your screen. The example in this video will show a little boy's face being blurred. This will be demonstrated using Adobe Premiere Pro CS6.

831 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question