Advertisement
Guest User

Untitled

a guest
Aug 19th, 2017
64
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.28 KB | None | 0 0
  1. import os
  2. import commands
  3.  
  4. file_list = commands.getoutput('find . -name "*.mp3"').split('\n')
  5.  
  6. for file in file_list:
  7.     path = os.path.dirname(file)
  8.     commands.getoutput('mkdir -p /Volumes/USBDRIVE/%s' % path)
  9.     commands.getoutput('cp %s /Volumes/USBDRIVE/%s' % (file, file))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement