开发者

Get creation date of multiple files in vb

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开发者_Go百科). Has anyone ever done this?


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:

  • For loops
  • FileSystemInfo Class
  • DirectoryInfo Class
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜