Skip to content

Instantly share code, notes, and snippets.

@napjon
Created January 21, 2016 04:20
Show Gist options
  • Save napjon/71e54e49b985f1776691 to your computer and use it in GitHub Desktop.
Save napjon/71e54e49b985f1776691 to your computer and use it in GitHub Desktop.
import fnmatch
import os
import shutil
matches = []
for root, dirnames, filenames in os.walk(rootPath):
for filename in filenames:
matches.append(os.path.join(root, filename))
print(os.path.join(root, filename))
shutil.move(os.path.join(root, filename), os.path.join(destDir, filename))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment