Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

check if a file exists

>>> import os
>>> os.path.isfile("d:Package1package1fibo.py")
True
>>> os.path.isfile("d:/Package1/package1/fibo.py")
True
>>> os.path.isfile("d:
onexisting.txt")
Source by www.tutorialspoint.com #
 
PREVIOUS NEXT
Tagged: #check #file #exists
ADD COMMENT
Topic
Name
7+3 =