Oct-01-2019, 03:54 PM
Newbie Alert
import os import glob import shutil path = input('Enter folder location: ') os.chdir(path) try: os.makedirs('videos') except FileExistsError: pass dst = path + r"\videos" for x in glob.glob('*.mp4'): shutil.move(path, dst) print('Moved Successfully')
Output:shutil.Error: Cannot move a directory