Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Looping through directory

52 views
Skip to first unread message

D.P. Roberts

unread,
Jan 7, 2009, 6:51:22 PM1/7/09
to
I have a directory named USERS which contains about 100 unique user folders.
Each user folder contains a folder named RECYCLER and I would like to
generate a report of the size of each user's RECYCLER folder. I already know
how to use vbs to lookup a folder size and write the results to a log file.
But what I don't know how to do is loop through the directories in the first
place. Anyone know how to do this?

Thanks!

Paul Randall

unread,
Jan 7, 2009, 9:57:26 PM1/7/09
to

"D.P. Roberts" <dpro...@nospampleeze.com> wrote in message
news:eeEfZLSc...@TK2MSFTNGP02.phx.gbl...

Sample code from the scripting help file SCRIPT56.CHM:

Function ShowFolderList(folderspec)
Dim fso, f, f1, s, sf
Set fso = CreateObject("Scripting.FileSystemObject")
Set f = fso.GetFolder(folderspec)
Set sf = f.SubFolders
For Each f1 in sf
s = s & f1.name
s = s & "<BR>"
Next
ShowFolderList = s
End Function

-Paul Randall


David Glienna

unread,
Jan 8, 2009, 1:19:55 AM1/8/09
to
You might want to take a look at Powershell 2.0 CTP. It lets you use simple
DOS-like commands to control the framework.

- David


"Paul Randall" <pau...@aol.com> wrote in message
news:egTvbzTc...@TK2MSFTNGP05.phx.gbl...

D.P. Roberts

unread,
Jan 8, 2009, 11:45:57 AM1/8/09
to
Thank you very much. This was most helpful and I appreciate your taking the
time to answer my question.

"Paul Randall" <pau...@aol.com> wrote in message
news:egTvbzTc...@TK2MSFTNGP05.phx.gbl...
>

0 new messages