


Private Sub ListFileAttributes()ĭim iRow As Integer, iCol As Integer, LastRow As Integer Then apply following script (adjust as you want). This allows access to the "FileSystemObject" which you'llĤ. Make sure, in VBA, you have a library reference to "Microsoft Scripting Runtime" (go to the VBA Editor and then the menu "Tools > References" to add the reference). Then use the "select all" and "copy as path" method to copy your results in cell A2.ģ. First go to a blank worksheet in Excel and name the column for cell A1 as "Files" (or whatever).Ģ. Here are the basics of the steps and code.ġ. Requires a little coding but works like a charm. paste it in Excel and run a VBA script to loop through each result to display any file attribute you want (at least any attribute available through the FileSystemObject). I use the "select all" and "copy as path" as suggested by others.
