Skip to content

Instantly share code, notes, and snippets.

@jineshpaloor
Created November 12, 2015 04:34
Show Gist options
  • Save jineshpaloor/22587df862fb9475b22e to your computer and use it in GitHub Desktop.
Save jineshpaloor/22587df862fb9475b22e to your computer and use it in GitHub Desktop.
script to copy all files from one folder by traversing recursively to another folder
import os
from shutil import *
rootdir = '/Users/jineshn/tools/Images.xcassets'
for subdir, dirs, files in os.walk(rootdir):
for file in files:
fn = os.path.join(subdir, file)
print fn
copyfile(fn, '/Users/jineshn/tools/output/'+file)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment