Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

python create directory

# This requires Python’s OS module
import os

# 'mkdir' creates a directory in current directory.
os.mkdir('tempDir') 
# can also be used with a path, if the other folders exist.
os.mkdir('tempDir2/temp2/temp')

# 'makedirs' creates a directory with it's path, if applicable.
os.makedirs('tempDir2/temp2/temp') 
Source by thispointer.com #
 
PREVIOUS NEXT
Tagged: #python #create #directory
ADD COMMENT
Topic
Name
3+2 =