troubleshooting Question

VBA errors with GetAttr() and fso.GetFile()

Avatar of Dave Credicott
Dave Credicott asked on
VBA
7 Comments1 Solution23 ViewsLast Modified:
I created an Excel spreadsheet to help recursively analyze our huge directory structures, recording directory info (number of files, file types, sizes, date modified, full pathname length, etc.). The file attributes are successfully obtained by either of the subject functions.  The output will help us reorganize and migrate network shared drives into the cloud.  Therefore, each directory and file must be fully included in the analysis.

However, when the VBA program encounters a filename with foreign characters, both functions fail with a "file not found" error (see attachments).  If I rename the file, changing the accented e to a plain E, the program works fine.  I can ignore the error with error handling, but then I don't have the necessary attributes in the analysis.  We are an international organization, so there are *plenty* of special characters.

I cannot find a way to include these files in the analysis.  Any help would be greatly appreciated.  The environment is Win 10 Office365 Excel 2016 with VBA 7.1.

Dave

Example of failing fileVBA Error Msg
Join the community to see this answer!
Join our exclusive community to see this answer & millions of others.
Unlock 1 Answer and 7 Comments.
Join the Community
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 7 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros