Reputation: 31
I'm trying to pull the creation date of all the files (1000+) in a folder on a local server to list in an excel file. I've been trying to use FileSystemInfo for this, but it doesn't seem to work to get the creation date of MULTIPLE files because it doesn't allow me to use wildcard characters to read all (not even sure if that's what I'll need to do). Has anyone ever done this?
Upvotes: 3
Views: 3399
Reputation: 163612
This should help you loop through all of the files:
Dim dirinfo As New DirectoryInfo("C:\somefolder")
For Each fsi As FileSystemInfo In dirinfo.GetFileSystemInfos()
debug.print(fsi.CreationTime)
Next
Some things to read up on:
Upvotes: 2