Listing Directory Files and Subfolders
How can I determine if my file is a directory and how can I list all these files in a directory as well as the subfolders?
How can I determine if my file is a directory and how can I list all these files in a directory as well as the subfolders?
Hi,
I found 2 links that will help you on your problem.
Here are the two links: http://allenbrowne.com/tips.html and http://excelexperts.com/VBA-Tips-List-Files-in-A-Folder
Teodora Skil
Here is a VBA script that might help solve your problem. The script described in the image below will list all the files contained in a folder.
When you run the script, the output will display all the files’ exact path or URL, their file names, their file sizes, and the date when they were last modified. You will immediately see if there were actually duplicate files inside the folder and delete them so you can free up some space. The image below describes the contents of the folder and its subfolder. It’s actually noticeable here that both folders have or contain files with the same file name.
The image below describes the supposed output in Microsoft Office Excel. Here, it clearly displays the duplicate files contained in the folder specified.
This procedure is completely explained in detail at VBA Tips – List Files In A Folder.