Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

.FoundFile Property for file size 1

Status
Not open for further replies.

Divercem

IS-IT--Management
Apr 2, 2007
39
US
I am writing a VBA script in Excel 2003 to find all .pst files and their pathnames on the Network drives. I have the names, paths, but cannot find a property for the file size. I want to collect the file sizes so I can determine how to best fit them on a DVD for storage so I can get them off of the network drive and quit backing them up everynight.



I have searched microsoft.com and can't find a list...maybe I'm not using the right keywords. Can some direct me to a list of properties for the FoundFile method? Or tell me how to get the file size of the the files that I have found?



Thanks
 
Thanks for your reply strongm.

That worked until I came across a 3 GB file, the result went negative. Any ideas?
 
The FileSystemObjexct is large-file aware, so try:

Debug.Print CreateObject("scripting.filesystemobject").GetFile(pathname).Size
 
wow...that did the trick.

Thanks strongm!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top