Its been awhile since I've messed with any kind of programming and I'll admit, I'm a bit rusty. I am an avid amazon mp3 user, but their downloads always have extra stuff attached to the track name, like Explicit, or Album Version. I want to make a program that will ask for a number of characters to remove from the end of the file name, and then rename the file. Only part of this I have figured out is i need th os module to specify where the files are.
jeffjpeterson 0 Newbie Poster
Recommended Answers
Jump to PostYou can use the os module to change the names as well.
Assuming Windows:os.system("rename longsongname.mp3 songname.mp3")
or
os.rename("longsongname.mp3","songname.mp3")
To shorten the names, you'll need slicing.
longName = "Thisisalongname.mp3" shortName = longName.split(".")[0][:5]+".mp3"
output
>>> shortName 'Thisi.mp3'
Jump to PostYou need maybe something like this
http://eyed3.nicfit.net/
Jump to PostAt least this mutagen module installed easyly with it's setup file:
Mutagen works on Python 2.3+ and has no dependencies outside the
CPython standard library.Installing
----------
$ ./setup.py build
$ su -c "./setup.py install"from mutagen.id3 import ID3 id3info= ID3('08-AudioTrack …
All 11 Replies
Tech B 48 Posting Whiz in Training
jeffjpeterson 0 Newbie Poster
jeffjpeterson 0 Newbie Poster
TrustyTony 888 pyMod Team Colleague Featured Poster
jeffjpeterson 0 Newbie Poster
TrustyTony 888 pyMod Team Colleague Featured Poster
jeffjpeterson 0 Newbie Poster
TrustyTony 888 pyMod Team Colleague Featured Poster
jeffjpeterson 0 Newbie Poster
jeffjpeterson 0 Newbie Poster
jeffjpeterson 0 Newbie Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.