Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

python os if file exists

import os.path

if os.path.isfile('filename.txt'):
    print ("File exist")
else:
    print ("File not exist")
Source by linuxize.com #
 
PREVIOUS NEXT
Tagged: #python #os #file #exists
ADD COMMENT
Topic
Name
6+5 =