Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import os
- import shutil
- allfiles = ['image1.png', 'image1.png']
- src = 'root directory'
- dest = 'folder on my desktop'
- for dirpath, subdirs, files in os.walk(src):
- for file in files:
- try:
- shutil.copy(os.path.join(src, file), dest)
- except:
- print(file)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement