sparky3009
Gawd
- Joined
- Jan 5, 2006
- Messages
- 530
Ok, so I have a website with a media player on it. To make a playlist, I need to use an xml file.
Since I don't want to make the playlist by handwriting everything... I want to make a batch file that I can drag and drop mp3 or flv files onto and have it append that to the xml file.
The format for the xml file is like this:
I'm not asking anyone to write the batch file for me... I just have NO idea where to start. Plus my scripting teacher didn't really teach me anything... luckily we didn't have a final in that class.
I don't need it to insert the image link... I want it to do that eventually, but I don't want to make a huge project out of it and then never finish it because it's overwhelming.
The things I need to know I guess are:
*how to have it add the <track> to </track> parts in between <tracklist> and </tracklist>
*how to use a variable for the file names, because all the files are in the same web directory, I just don't know how to make it add the file name (I would be using the batch file with files on my computer to get the names, then putting them in the web directory online, so I have the files on my hdd to drag/drop onto the batch file).
*the syntax to append static information to the xml file
*that's actually all I can think of for now, but I might get stuck down the road
Or if someone has a better way to do this than a batch file.....
Since I don't want to make the playlist by handwriting everything... I want to make a batch file that I can drag and drop mp3 or flv files onto and have it append that to the xml file.
The format for the xml file is like this:
Code:
<?xml version='1.0' encoding='UTF-8' ?>
<playlist version='1' xmlns='http://xspf.org/ns/0/'>
<trackList>
<track>
<creator>[ARTIST]</creator>
<title>[SONG NAME]</title>
<location>[WEB LINK TO FILE]</location>
<image>[WEB LINK TO IMAGE IF IT'S NOT A VID]</image>
</track>
</trackList>
</playlist>
I'm not asking anyone to write the batch file for me... I just have NO idea where to start. Plus my scripting teacher didn't really teach me anything... luckily we didn't have a final in that class.
I don't need it to insert the image link... I want it to do that eventually, but I don't want to make a huge project out of it and then never finish it because it's overwhelming.
The things I need to know I guess are:
*how to have it add the <track> to </track> parts in between <tracklist> and </tracklist>
*how to use a variable for the file names, because all the files are in the same web directory, I just don't know how to make it add the file name (I would be using the batch file with files on my computer to get the names, then putting them in the web directory online, so I have the files on my hdd to drag/drop onto the batch file).
*the syntax to append static information to the xml file
*that's actually all I can think of for now, but I might get stuck down the road
Or if someone has a better way to do this than a batch file.....