import os, sys
import shutil
src = '/home/mihuzz/PycharmProjects/dc/face_image'
dst = '/home/mihuzz/PycharmProjects/dc/face'
#os.mkdir("/home/mihuzz/PycharmProjects/dc/faces")
folder = []
for root, dirs, files in os.walk(src):
for file in files:
if file.endswith(('png','jpg')):
shutil.move(src, dst)
#folder.append(file)