This is because you are accessing all files in those folders. If any file has a filename that contains unicode or other odd characters, you will get this error.
There isn’t a way around this as far as I know.
Related:
- File search return error
- Analysis Help to find a file
- Filename with non-latin chars - relevance returns <error> The expression could not be evaluated: class IllegalFileName
- 2 parts: Find Files vs Dir /s /a ; How to store "find files" results in a file
- File search return error
- Parsing file.txt and if exist one of value in folder
- Trying to exclude a directory from descendants search
- Relevance issues
- Regex to find files with social security numbers
- Find a file in the server \ pc