R.Wieser
2017-09-14 12:29:06 UTC
Hello all,
As in the subject line, a rather very simple question: How to I check if a
path spec is pointing at a file ?
PathFileExists doesn't cut it, as it not only returns true for folders, but
also devices like PRN, COM1 and alike.
GetFileAttributes doesn't work either, as it does not return any difference
between files and devices.
SHFileExists (exported by ordinal only) appears to be problematic, as I
could not entice it to return anything else than False ...
Anything other I can try ? Preferrably something that is based on
detecting if its a file, as opposed to trying to exclude everything else ...
Regards,
Rudy Wieser
As in the subject line, a rather very simple question: How to I check if a
path spec is pointing at a file ?
PathFileExists doesn't cut it, as it not only returns true for folders, but
also devices like PRN, COM1 and alike.
GetFileAttributes doesn't work either, as it does not return any difference
between files and devices.
SHFileExists (exported by ordinal only) appears to be problematic, as I
could not entice it to return anything else than False ...
Anything other I can try ? Preferrably something that is based on
detecting if its a file, as opposed to trying to exclude everything else ...
Regards,
Rudy Wieser