moving files from screenshots to a different folder

import os
import shutil

directory = ('C:\\Users\\Gal\\Videos\\Captures')
target = ('C:\\zorko')
destination = 'zorko'
for filename in os.listdir(directory):
    if 'teorija' in filename:
        shutil.move(os.path.join(directory, filename), os.path.join(target, filename))

CLICK HERE to find out more related problems solutions.

Leave a Comment

Your email address will not be published.

Scroll to Top