Hi all.
My problem is that I want a way to take a playlist file(.m3u), and copy all the songs in this playlist to my desktop.
I've managed to open the file, strip out the rubbish, and be left with a list of file names e.g. "F:/Music/ABC.mp3".
All I need to do then is copy this file into a folder on the desktop, but I can't work out how to do it.
If it was a .txt file I'd just open it up and copy it line by line to the new location, but I don't think I can do it this way here. Therefore I was looking for a function that will allow me to copy the file as a whole. I found CopyFile(), but I can't get it to work, even when I hard code the names in like below nothing is copied.
It doesn't even work with a .txt file so I don't think it's the file extension causing issues.
Any idea what I'm doing wrong?
I'm open to using any other methods btw, don't have to use this function, I'm happy to use anything quick and dirty if needs be!
Thanks for any help.
My problem is that I want a way to take a playlist file(.m3u), and copy all the songs in this playlist to my desktop.
I've managed to open the file, strip out the rubbish, and be left with a list of file names e.g. "F:/Music/ABC.mp3".
All I need to do then is copy this file into a folder on the desktop, but I can't work out how to do it.
If it was a .txt file I'd just open it up and copy it line by line to the new location, but I don't think I can do it this way here. Therefore I was looking for a function that will allow me to copy the file as a whole. I found CopyFile(), but I can't get it to work, even when I hard code the names in like below nothing is copied.
Code:
CopyFile("C:/Documents and Settings/M/Desktop/test.mp3",
"C:/Documents and Settings/M/Desktop/tempMusic",
0);
It doesn't even work with a .txt file so I don't think it's the file extension causing issues.
Any idea what I'm doing wrong?
I'm open to using any other methods btw, don't have to use this function, I'm happy to use anything quick and dirty if needs be!
Thanks for any help.