Jump to content
Light-O-Rama Forums

Batch Commands

Guest Guest

Recommended Posts

Guest wbottomley

Ok... I'm quite ignorant when it comes to setting up batch commands and all of that jibberish stuff.

So, here's my idea.

Setup command one that will execute when the startup sequence runs. This command will execute an ftp to upload a graphic to the site that says, "Lights On."

The second command will do the same thing but during the closing sequence that says, "Lights Off."

Can this be achieved without over-powering my alligator brain?

Link to comment
Share on other sites


Your FTP product may have a 'watcher' feature. It just looks for new files to move and moves them when it does find them. Your batch can just copy or replace a file in the watched folder.

Your site page will have a generic name for this file like CurrentLights.jpg
But you start with two images for the two states. LightsOn.jpg and LightsOff.jpg

Start up song batch file
copy C:LORLightsOn.jpg C:LORWatchedFolderCurrentLights.jpg

Close down song batch file
copy C:LORLightsOff.jpg C:LORWatchedFolderCurrentLights.jpg

You can get a free FTP product to do this here. http://www.smartftp.com/

Link to comment
Share on other sites

I do this with my display - there is a built in FTP command in DOS you can specify a Run script - I will see if I can find my scripts. My show computer is put away.

Go to DOS and type in FTP you will get the base info.


Link to comment
Share on other sites

The Windows command feature can be very useful, and there's serveral ways to make it "do stuff". Though I do wish it were possible to trigger Windows commands from within the sequence itself, I believe the current version of S2 only fires the Windows command at the start of the sequence.

In my case, I use the Windows command to call a batch called SongStart.bat, passing to it text that I want to show up on my web site as the sequence starts (in this case the name of the song or something like that).

This batch file then takes that string of text, writes it to a file called CurrentlyPlaying.htm, and runs the DOS FTP command with a -s: parameter that tells the FTP client to execute with a preloaded list of responses. This is what logs into the FTP site, passing the ID and password, as well as the command to upload the .htm file to my site.

There are several pages within the web site that "include" this .htm file as part of its output, so the uploaded .htm file is completely reusable. If you wanted to, you could use a similar approach to upload pre-generated graphics files, pass song title and artist info to RDS-enabled transmitters, etc.

The attached image is a screen shot of how I am using the Windows Command.

SongStart.Bat looks something like this (keep in mind there's some word wrapping going on here):

- - - - - - - - - CUT HERE - - - - - - - - -

If (%1) == () Goto End

Echo %1 %2 %3 %4 %5 %6 %7 %8 %9 > "C:Program FilesLight-O-Rama2009 ShowCurrentlyPlaying.htm"
FTP -s:"C:Program FilesLight-O-Rama2009 ShowUpdateNowPlaying.tpl"

- - - - - - - - - CUT HERE - - - - - - - - -

UpdateNowPlaying.tpl looks something like this:

- - - - - - - - - CUT HERE - - - - - - - - -


cd NowPlaying
put "C:Program FilesLight-O-Rama2009 ShowCurrentlyPlaying.htm"
- - - - - - - - - CUT HERE - - - - - - - - -

The thing to keep in mind is that this file provides RESPONSES to the FTP client's prompts, so unless you actually run through it manually in real time the .tpl file may not make much sense.

I hope this makes some sense. If not, let me know what needs clarification.


Attached files 201788=11222-Windows_Command_Example.jpg

Link to comment
Share on other sites

OK, so for the record, the forum software is chewing up my examples. I've tried twice to fix it to no avail. What I see when I click "SEND" isn't what you see afterwards. It's dropping parts of the fully qualified directory names from them. Though the folder names may not quite match up exactly, the concepts are the same.


Link to comment
Share on other sites

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