Feb-21-2017, 03:59 PM
This created new Working folder but for some reason it does not coy created folders from Python_1, any idea where the error is:
import os import shutil root_path = r"C:\GEOS455\Assign2" new_main_folder = 'Working' new_root_path = os.path.join(root_path, new_main_folder) os.mkdir(new_root_path) list_dir = [] for directory in list_dir: src = os.path.join(root_path, directory) dest = os.path.join(new_root_path, directory + '_working') shutil.copytree(src, dest)