HOW to create a folder with a python codes
The below codes can see you all the way to perform crucial task of creating a folder (new directory).
import os def createFolder(directory): try: if not os.path.exists(directory): os.makedirs(directory) except OSError: print ('Unable to Create directory. ' + directory +': Error') # Here creates a folder (shopinson) in the current directory the this python file resides in createFolder('./shopinson/')
the above Python Codes creates a folder called (shopinson) in the current dire