That's what I'm doing using batch files run under windows task scheduler
Code:
cd C:\Radio\Revealed Recordings\part 01\Replay
xcopy *.mp3 "c:\Radio\Replay House\" /y
del *.mp3
cd C:\
Can you give me the syntax for doing that with a PAL please - this is a typical show
Code:
//Set integer value to number of parts in show
const PARTS : Integer = 1;
//Set integer value to "1" for weeks of month to run script
const WEEK_ONE : Integer = 1;
const WEEK_TWO : Integer = 0;
const WEEK_THREE : Integer = 0;
const WEEK_FOUR : Integer = 0;
const WEEK_FIVE : Integer = 0;
var Song : TSongInfo;
var Present : DateTime;
var curPart, Year, Month, Day, WeekOfMonth : Integer;
var D : string;
var Artist : string;
var Show : string;
var Week : array[0..4] of Integer;
// Settings, Artist has to be EXACTLY like the folder-name.
Artist := 'Meko Hadzic';
Show := 'High Definition On 1Mix Radio..';
//Check if proper week to run
PAL.LockExecution;
Week[0] := WEEK_ONE;
Week[1] := WEEK_TWO;
Week[2] := WEEK_THREE;
Week[3] := WEEK_FOUR;
Week[4] := WEEK_FIVE;
WeekOfMonth := 0;
Present := Now;
DecodeDate(Present, Year, Month, Day);
while Day > 0 do
begin
Day := Day - 7;
if Day > 0 then
WeekOfMonth := WeekOfMonth + 1;
end;
PAL.UnlockExecution;
//if proper week, continue
while (Week[WeekOfMonth] = 1) do
begin
SubDir['C:\Radio\' + Artist].Rescan;
curPart := 0;
//Wait Top of the hour
PAL.WaitForTime('XX:00:00');
PAL.LockExecution;
Queue.Clear;
//Add files to top of queue in reverse order so last loaded plays first
//Queue.Addfile ('C:\Radio\'+Artist+'\id\id2.mp3',ipTop);
//Dir['C:\Radio\Jingles&Wipes'].QueueTop(smRandom, NoRules);
//Dir['C:\Radio\'+Artist+'\part 04'].QueueTop(smLRP, NoRules);
//Dir['C:\Radio\Jingles&Wipes'].QueueTop(smRandom, NoRules);
//Dir['C:\Radio\'+Artist+'\part 03'].QueueTop(smLRP, NoRules);
//Dir['C:\Radio\Jingles&Wipes'].QueueTop(smRandom, NoRules);
//Dir['C:\Radio\'+Artist+'\part 02'].QueueTop(smLRP, NoRules);
//Dir['C:\Radio\Jingles&Wipes'].QueueTop(smRandom, NoRules);
Dir['C:\Radio\'+Artist+'\part 01'].QueueTop(smLRP, NoRules);
//Queue.Addfile ('C:\Radio\'+Artist+'\id\id1.mp3',ipTop);
Dir['C:\Radio\Jingles&Wipes'].QueueTop(smRandom, NoRules);
//Fade into jingle, which was loaded last
//Check for incorrectly loaded track and eject if it exists
if QueuedPlayer <> NIL then
QueuedPlayer.Eject;
//Fade into jingle, which was loaded last
ActivePlayer.FadeToNext;
PAL.UnlockExecution;
PAL.WaitForPlayCount(2);
// Inserting title and date
while (curPart < PARTS) do
begin
Song := TSongInfo.Create;
DecodeDate(Present, Year, Month, Day);
D := (IntToStr(Day)) + '.' + (IntToStr(Month)) + '.' + (IntToStr(Year));
Song['artist'] := Artist + ' @MekoHadzic';
Song['title'] := Show + ' (' + D + ') Listen now http://bit.ly/2IZUaOU';
Encoders.SongChange(Song);
Song.Free;
curPart := curPart + 1;
//For multi-part shows otherwise zero
PAL.WaitForPlayCount(0);
end;
Week[WeekOfMonth] := 0;
end;
BTW - I didn't write that myself, I had help.
Unlike I would guess, the majority of SAM owners, my station only plays pre-recorded shows, which are mostly single or perhaps 2 files, so I don't use catagories. but when no show is scheduled, one in the 'replay' folder is loaded via a clockwheel.
It would be good to incorporate some code in each show PAL that would move a show after it's played, into the 'replay' folder.
Thanks in advance..
_________________
Its all about the music..
https://www.1mix.co.uk