528 args.moveto, mvtarget) |
528 args.moveto, mvtarget) |
529 mvsource = os.path.dirname(srcfile) |
529 mvsource = os.path.dirname(srcfile) |
530 print "Moving processed files from %s to %s" % ( |
530 print "Moving processed files from %s to %s" % ( |
531 mvsource, mvtarget) |
531 mvsource, mvtarget) |
532 if not args.dryrun: |
532 if not args.dryrun: |
533 os.makedirs(mvtarget) |
533 try: |
|
534 os.makedirs(mvtarget) |
|
535 except OSError, e: |
|
536 if e.errno != os.errno.EEXIST: |
|
537 raise |
|
538 pass |
534 for mvsrc in mvlist: |
539 for mvsrc in mvlist: |
535 mvfn = os.path.basename(mvsrc) |
540 mvfn = os.path.basename(mvsrc) |
536 if os.path.splitext(mvfn)[1] in ['.txt', '.mkv', '.nfo']: |
541 if os.path.splitext(mvfn)[1] in ['.txt', '.mkv', '.nfo']: |
537 continue |
542 continue |
538 print mvfn |
543 print mvfn |