![]() |
|
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Programmer
Join Date: Apr 2005
Location: Uk
Posts: 68
Rep Power: 4
![]() |
Here's a little code i wrote up to transer all my music files ".mp3" and ".wma" from the path file, and copy them to my mp3 player,
easy as 1 - 2 -3def EntireCopy():
#Create a dat file with artist to exclude
exceptopen = open("except.dat",'r')
exceptions = exceptopen.read()
dest = raw_input("Enter Path To Copy Music To: ")
path = raw_input("Enter Path Of Music Files? ")
for file in os.listdir(path):
if file.endswith(""):
if file not in exceptions:
root = []
root.append(path)
root.append(file)
root = "".join(root)
rootf = file
for file in os.listdir(root):
if file.endswith(".mp3") or file.endswith(".wma"):
copyfile = []
copyfile.append(path)
copyfile.append(rootf)
copyfile.append("\\")
copyfile.append(file)
copyfile = "".join(copyfile)
shutil.copy(copyfile, dest)
print file, "coppied to" ,dest
else:
print file, "not audio file"
Main()Last edited by SaturN; Jun 9th, 2005 at 2:00 PM. Reason: code tags not closed |
|
|
|
|
|
#2 |
|
I eat cake for breakfast.
![]() ![]() ![]() ![]() Join Date: Jul 2004
Location: In my box.
Posts: 4,434
Rep Power: 9
![]() |
Lookin' good. I wish my MP3 player supported direct file transfers...
|
|
|
|
|
|
#3 |
|
Programmer
Join Date: Apr 2005
Location: Uk
Posts: 68
Rep Power: 4
![]() |
I am just very lucky, what can i say, lol, that' part of an entire program i have wrote to manage my mp3 player, the program it came with is useless!! lol, it's just slow that's all, but then it's transfering about 130 mp3's, i can't expect better really, lol
|
|
|
|
|
|
#4 |
|
Programming Guru
![]() ![]() |
what kind of mp3 player do you have SaturN?
__________________
Profanity is the one language that all programmers understand. Check out my Blog <---updated Nov 30 2007! |
|
|
|
|
|
#5 |
|
Programmer
Join Date: Apr 2005
Location: Uk
Posts: 68
Rep Power: 4
![]() |
Philips Wearable Digital Audio, it's only 512mb, but it holds more than i though it would
![]() |
|
|
|
![]() |
| Bookmarks |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|