Programming Forums
User Name Password Register
 

RSS Feed
FORUM INDEX | TODAY'S POSTS | UNANSWERED THREADS | ADVANCED SEARCH

Reply
 
Thread Tools Display Modes
Old Jun 9th, 2005, 1:59 PM   #1
SaturN
Programmer
 
Join Date: Apr 2005
Location: Uk
Posts: 68
Rep Power: 4 SaturN is on a distinguished road
Talking Transfering file to Mp3 Player!

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 -3
def 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
SaturN is offline   Reply With Quote
Old Jun 9th, 2005, 2:19 PM   #2
Ooble
I eat cake for breakfast.
 
Ooble's Avatar
 
Join Date: Jul 2004
Location: In my box.
Posts: 4,434
Rep Power: 9 Ooble is on a distinguished road
Lookin' good. I wish my MP3 player supported direct file transfers...
__________________
Me :: You :: Them
Ooble is offline   Reply With Quote
Old Jun 9th, 2005, 3:17 PM   #3
SaturN
Programmer
 
Join Date: Apr 2005
Location: Uk
Posts: 68
Rep Power: 4 SaturN is on a distinguished road
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
SaturN is offline   Reply With Quote
Old Jun 9th, 2005, 3:29 PM   #4
Pizentios
Programming Guru
 
Pizentios's Avatar
 
Join Date: May 2004
Location: Brandon, Manitoba, Canada
Posts: 2,023
Rep Power: 7 Pizentios is on a distinguished road
Send a message via ICQ to Pizentios Send a message via MSN to Pizentios
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!
Pizentios is offline   Reply With Quote
Old Jun 9th, 2005, 3:42 PM   #5
SaturN
Programmer
 
Join Date: Apr 2005
Location: Uk
Posts: 68
Rep Power: 4 SaturN is on a distinguished road
Philips Wearable Digital Audio, it's only 512mb, but it holds more than i though it would
SaturN is offline   Reply With Quote
Reply

Bookmarks

« Previous Thread in Forum | Next Thread in Forum »

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump




DaniWeb IT Discussion Community
All times are GMT -5. The time now is 1:54 PM.

Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC