Advertisement
Guest User

Untitled

a guest
Apr 28th, 2017
42
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.30 KB | None | 0 0
  1. import os
  2. import shutil
  3.  
  4.  
  5. for root, dir, files in os.walk('./iTunes_Music'):
  6. if not files:
  7. continue
  8. for song_file in files:
  9. if not "mp3" in song_file:
  10. continue
  11. old_file_path = os.path.join(root, song_file)
  12. shutil.move(old_file_path, "./move/%s" % song_file)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement