Advertisement
Guest User

Untitled

a guest
Apr 1st, 2015
241
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.37 KB | None | 0 0
  1. import os, sys, glob, shutil
  2.  
  3. root_dir = "C:UsersxxxxDesktopTest\"
  4. country_dir = "Country*\"
  5.  
  6. #do_some_function
  7.  
  8. for path, dirname in os.walk(root_dir):
  9. if country_dir in path:
  10. for subdirname in dirname:
  11. if subdirname.startswith('Country'):
  12. for fname in glob.glob('*.shp'):
  13. shutil.copyfile(do_some_function, fname)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement