Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

create folders in python overwright existing

import os
import shutil

path = 'path_to_my_folder'
if not os.path.exists(path):
    os.makedirs(path)
else:
    shutil.rmtree(path)           # Removes all the subdirectories!
    os.makedirs(path)
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #create #folders #python #overwright #existing
ADD COMMENT
Topic
Name
1+6 =