Skip to content

Instantly share code, notes, and snippets.

@stormychel
stormychel / create-folder.py
Created May 7, 2021 — forked from keithweaver/create-folder.py
Create a folder with Python
View create-folder.py
import os
def createFolder(directory):
try:
if not os.path.exists(directory):
os.makedirs(directory)
except OSError:
print ('Error: Creating directory. ' + directory)