Avatar of Dave Credicott
Dave Credicott
Flag for United States of America

asked on 

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

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.


Example of failing fileVBA Error Msg

Avatar of undefined
Last Comment
Bill Prew

8/22/2022 - Mon