shanenin Posted September 2, 2005 Report Share Posted September 2, 2005 this below is probably my simplest yet most useful thing I have written. The cool part is, since it is python it runs also on windows. It is a script that searches through a directory and renames files, but takses out extra info that is not needed. for example:shane@mainbox ~ $ ls sopranosThe_Sopranos_S02E10_-_Bust_Out.jo44.ShareReactor.aviThe_Sopranos_S02E11_-_House_Arrest.jo44.ShareReactor.aviThe_Sopranos_S02E12_-_Knight_in_White_Satin_Armor.jo44.ShareReactor.aviThe_Sopranos_S02E13_-_Funhouse.jo44.ShareReactor.aviyou can have it remove ".jo44.ShareReactor" from each title. Or with a music cd of mine that looks like thisMetallica - 2 X 4.mp3Metallica - Ain't My Bitch.mp3Metallica - Bleeding Me.mp3Metallica - Cure.mp3Metallica - Hero of the Day.mp3Metallica - King Nothing.mp3Metallica - Mama Said.mp3Metallica - Poor Twisted Me.mp3Metallica - Ronnie.mp3Metallica - The House Jack Built.mp3Metallica - The Outlaw Torn.mp3Metallica - Thorn Within.mp3Metallica - Until It Sleeps.mp3Metallica - Wasting My Hate.mp3it will clean it up to thisshane@mainbox ~/Load $ ls2 X 4.mp3Ain't My Bitch.mp3Bleeding Me.mp3Cure.mp3Hero of the Day.mp3King Nothing.mp3Mama Said.mp3Poor Twisted Me.mp3Ronnie.mp3The House Jack Built.mp3The Outlaw Torn.mp3Thorn Within.mp3to use it on winows you just need to drag the script to the directory you want to clean up, and click on it. It will ask you what phrase you want removed. It also will show you the changes that will be made before making them. It gives you a chance to quit if everything does not look correcthere is the scripthttp://webpages.charter.net/lindbergfamily/rename.py Quote Link to post Share on other sites
Brian_Holiday Posted September 2, 2005 Report Share Posted September 2, 2005 Nice, are you going to leave it up for a while or should I copy it down? I also need to take a python tutorial, can you suggest one? BH Quote Link to post Share on other sites
shanenin Posted September 2, 2005 Author Report Share Posted September 2, 2005 (edited) I plan on leaving it up for a while.as to tutorials. got my start with a book, this one was really desighned for the beginner in mindhttp://www.amazon.com/exec/obidos/tg/detai...=books&n=507846as to online tutorials, I can only think of this one off hand. their are probably better ones out there.http://www.faqs.org/docs/diveintopythonedit added later//this free online book looks promisinghttp://www.byteofpython.info/ Edited September 2, 2005 by shanenin Quote Link to post Share on other sites
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.