Directory() includes files that match by shortname but not by longname. Apparently the underlying .Net code does not check for the long names as well. See https://www.xsharp.eu/forum/public-chit-chat/2678-find-files-pitfall