Jump to content
Light-O-Rama Forums

Sharing a simple Windows script to upload the current song


Recommended Posts

I'm sure it has been covered before but I've now that I have it working I'd share my way of updating a "Now Playing" textbox on my website with no special software other than 2 simple text files you can copy/paste the code below into. Your paths will change depending where you installed LOR or what files you want to use. My example uses C:LORAUDIO

For each sequence add the Windows command

C:LORAUDIOFTP_CurrentSong.bat the-name-of-the-song

There is a max of 9 words for the song title in the example I've provided.

The first file is FTP_CurrentSong.BAT
Not sure how the site will display this but there are 2 lines.
Line 1 writes the currentsong.txt file based
Line 2 FTPs the file to your FTP site

ECHO %1 %2 %3 %4 %5 %6 %7 %8 %9>c:loraudiocurrentsong.txt
FTP -s:c:loraudioFTP_CurrentSong.txt

The 2nd file is FTP_CurrentSong.txt which is a 'script' used by the Windows FTP program.

open ftp.yoursitehere.com

cd /
lcd c:loraudio
put currentsong.txt
Link to comment
Share on other sites

  • 2 weeks later...

I am curious about any more info on this. I would also like to possibly put this on my website. What do you do on the website? Do you create a text box or a html code box with any other info in it? Or what tells it where to go on your web page?

Link to comment
Share on other sites

There are a number of ways you can display the contents; either as part of a script in ASP/PHP/etc or basic HTML such as a frame/inline frame or a server-side include.
Part of it will depend on what your ISP provies and depending on the host you might need to change the file extension to get things working properly.

I used the server-side include since my ISP enables it and it was the easiest option for me. You can check it out on the left-side of my page at http://www.oxbowmanor.com/

Link to comment
Share on other sites

This topic is now closed to further replies.
  • Create New...