Count files in SCCM-inboxes
Working on some problems with old DDR-files and googled up a script that exported count of files to excel… did a small hack to it and it’s a nice-to-have tool.
Set oFSO = CreateObject("Scripting.FileSystemObject") ListFolders("\\MyServername\SMS_C01\inboxes") Sub ListFolders(sPath) Set oFolder = oFSO.GetFolder(sPath) if oFolder.Files.Count <> 0 then wscript.echo Left(oFolder.Files.Count & " ", 6) & vbTab & oFolder.Path End if For Each oFldr In oFolder.SubFolders ListFolders oFldr.Path Next End Sub
Original script: http://myitforum.com/cs2/blogs/dhite/archive/2006/07/23/22467.aspx