lad1337

Untitled

Mar 30th, 2012
62
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.57 KB | None | 0 0
  1. import os
  2. import glob
  3. import shutil
  4.  
  5. destination = "/Volumes/HDD/lad1337/Desktop/m"
  6. origin = "/Volumes/INTENSO/Movies"  # insert the path to the directory of interest here
  7. dirList = os.listdir(destination)
  8. print str(dirList)
  9. for fname in dirList:
  10.     curOPath = origin+'/'+fname+'/'
  11.     curDPath = destination+'/'+fname+'/'
  12.     print fname
  13.     for fType in ['nfo','tbn','jpg']:
  14.         curList = glob.glob(curOPath+'*.'+fType)
  15.         for metaDataFile in curList:
  16.             print "moving", metaDataFile, "to", curDPath
  17.             shutil.copy(metaDataFile,curDPath)
Advertisement
Add Comment
Please, Sign In to add comment