Really?
As pretty much all usage I have seen of that function does eaxctly that.
https://www.exceltrick.com/formulas_macros/vba-dir-function/
https://trumpexcel.com/vba-dir-function/
Plus I used your code to print out all the files in my temp folder without any issue.?
Yeah, it works nicely BUT you can NOT, while running through the files, use Dir() one more time.
Why do that, you say - in my case I was (wrongly !) running through Word-documents using Dir() and examine each of them for Hyperlinks to a local FILE - and here I used Dir() one more time to test if that file exists - this second use of Dir() screwed up the FIRST use of Dir() - that's why I said it looked like the "directory chain of files" were broken ... and it was, because of the SECOND use of Dir().
Hope you got it - english is NOT my first language
