
# https://www.globalsino.com/ICs/
# Move all files from orginal folder to a new folder

import shutil, os
import glob

new_subfolder= "NewSubfolder"

Original = r"C:\0Python\images"
TargetParentPath = r"C:\0Python\csvForTests" 

# Path of the new subfolder
new_path = os.path.join(TargetParentPath, new_subfolder)

if not os.path.exists(new_path):    
    os.makedirs(new_path)
    for f in glob.glob(f"{Original}/*.*"):
        shutil.move(f, new_path)
        
else:
    for f in glob.glob(f"{Original}/*.*"):
        shutil.move(f, new_path)
    
