Showing posts with label python folder exists os path. Show all posts
Showing posts with label python folder exists os path. Show all posts

Thursday, July 17, 2014

How to determine if a folder exists

Code
import os                                              #1
os.path.exists(folder_path_string)                     #2

How this works - Line by Line

import os                                           #1

Imports the os module

os.path.exists(folder_path_string)                  #2
 
This line checks for a folder in the folder_path_string and returns either True or False