Come see why top tech companies like Mailchimp and Media Temple use Linux Academy to build their employee training programs.
Everything works except this part
import os import sys #path to file from the first argument (no checking) fname = sys.argv #fname = r'E:\\TV Shows\\How I Met Your Mother\\Season 6\\How.I.Met.Your.Mother.S06E18.720p.HDTV.X264-DIMENSION.mkv' print fname # Now split the path to the directory and the bare name (better to say it # splits the last element of the path and it does not care whether it is # a file name or a subdirectory name. path, barename = os.path.split(fname) print path print barename parent = os.path.normpath(os.path.join(path, '..')) print "parent directory:", parent # Create file, delete and recreate it if it exists. This will # change the date modified status of the Show Name folder # so you can view your show list by date order. logname = os.path.join(parent, 'DateMarker.log') if os.path.isfile(logname): os.remove(logname) logfile = open(logname, 'w') logfile.write('Episode ' + fname + ' has been created. This is a marker file, to change the date modified status of the show name.') logfile.close()
if os.path.isfile(logname): os.remove(logname) logfile = open(logname, 'w') logfile.write('Episode ' + fname + ' has been created. This is a marker file, to change the date modified status of the show name.') logfile.close()
|Access Control Entries lost in Windows folders||3||53|
|getting a macbook pro up and running - where / how do I get the OS, where to get a cheap power supply?||14||115|
|Error Cannot find the type for custom attribute 'CmdletBidning'. Make sure that the assembly that contains this type is loaded.||4||52|
|Creating powershell to convert users into contacts and copy them to different forest then import them||5||44|
Join the community of 500,000 technology professionals and ask your questions.
Connect with top rated Experts
9 Experts available now in Live!