[Tutor] Checking for the existence of a file on workstations in
Windows LAN
R. Alan Monroe
amonroe at columbus.rr.com
Tue Sep 23 15:54:18 EDT 2003
I'd like to check client machines on a LAN for the existence of
certain files, via their C$ share, in a corporate environment.
I can use the os.stat or os.path.exists functions to see whether the
file is there, but on those times when the functions fail, how do I
know if it was because the file genuinely didn't exist, or because I
didn't have rights to their c$ share? I need to distinguish between
the two cases. Even better would be to distinguish the third case
where the machine couldn't be found at all, likely because it's
powered off.
Alan
More information about the Tutor
mailing list