'Ask to open the report now or just close MsgBox "An error has occured: Unable to read destination folder" SourceFolder = (objStartFolder.Title).Path If InStr(1, TypeName(objStartFolder), "Folder") > 0 Then ' Here we use TypeName to detect the result. "Please select the FOLDER to report on.", BIF_editbox + BIF_returnonlyfsdirs) Set objStartFolder = objDlg.BrowseForFolder (&H0, _ Set objNetwork = CreateObject("WScript.Network") Set objShell = CreateObject("WScript.Shell") Set objDlg = WScript.CreateObject("Shell.Application") Set objFSO = CreateObject("Scripting.FileSystemObject") Remember Excel 2003 can only handle a maximum of 65,536 rows so if you have scanned more files than that then Excel 2007 will do the job. To use the VBS script download the attached file or copy the below script to a text file and save as something.vbs, run the script by double clicking on it, and browse to a folder you want to report on.ĭepending on the number of files the VBS script may take a while to run, when it is complete a CSV file will be generated in the same folder as the script which can then be imported into something like Excel and you can do some nice reports. File Owner (not available for all files).The VBS script will get the following properties In my case I needed to run a report on approx 250,000 files which this VBS script managed. I recently had a need to list the properties of all files in a folder and its sub folders to find files that had not been used in a long time, or files where the owner had left.
0 Comments
Leave a Reply. |