I am having a similar problem with filesystemobject AND with DIR() with the file not found. The path does have an apostrophe in the PATH but not the filename. I use ? dir(FullFileName) in the debug window and DIR cannot find the file either, although the file is clearly present. What's extra weird is only fso.GetFile and DIR exhibit this behavior. My debug window calls to
? dir("F:\OneDrive\Documents\Bowling\Scot's Pots\SP Test League Handicap.txt")
returns a blank line.
? fso.GetAbsolutePathName("F:\OneDrive\Documents\Bowling\Scot's Pots\")
returns
F:\OneDrive\Documents\Bowling\Scot's Pots
and
? fso.GetBaseName("SP Test League Handicap.txt")
returns
SP Test League Handicap
Yet,
? fso.GetFIle("{F:\OneDrive\Documents\Bowling\Scot's Pots\SP Test League Handicap.txt")
generates error 53: cannot find file.
I've run this code thousands of times with no problem, but today, it blows up.
HELP!