Hi,

import os

if os.path.exists('/path/to/file'):
    # File exists
else:
    # File doesn't exist

It works for files as well as directories.

Regards,
Vikram U Shenoy
_______________________________________________
Tutor maillist  -  [email protected]
http://mail.python.org/mailman/listinfo/tutor

Reply via email to