Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

check if directory exists python

>>> import os
>>> os.path.isdir('new_folder')
True
>>> os.path.exists(os.path.join(os.getcwd(), 'new_folder', 'file.txt'))
False
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #check #directory #exists #python
ADD COMMENT
Topic
Name
8+7 =