Originally Posted by
mnementh
...The program code from above, happily lists everything in my selected folder/subfolders EXCEPT .ZIP files. My test folder has over 1,000 files in it but only the non .ZIP files show.
Can anyone shed some light on why this seems to happen?
The .ZIP files are NOT hidden or system files and should show up but don't...
From the link at #7, I downloaded both the code and the sample workbook provided by XLGibbs. W/O any modification, it returned the few .zip files I had in the chosen folder.
Presuming you made no alterations to the code, here would be an easy try, just in case you may have a file search 'saved' in the .Filename area.
In the below snippet, add the line shown:
With Application.FileSearch
.LookIn = strSourceFolder 'look in the folder browsed to
.FileType = msoFileTypeAllFiles 'get all files
'// to return all; clear any previous search//
.Filename = ""
'//to get just the zip files returned //
'//.Filename = "*.zip"
.SearchSubFolders = True 'search sub directories
.Execute 'run the search
'...remainder of code in PopulateDirectoryList()
If that does not work, maybe provide (attach) one of the zip files to test against.
If it does work, I respectfully/humbly believe there is one harmless error in the same procedure. If you are looking to return the size of ea file, find the line and try:
'.Offset(i, 1) = Format(objFile.Size, "0,000") & " KB"
.Offset(i, 1) = Format(Application.Max(objFile.Size \ 1024, 1), "#,###") & " KB"
.Offset(i, 2) = objFile.DateLastModified
Hope that helps,
Mark