Jump to content

Save M3U with Date

Recommended Posts

Hi people, i have a little question, how i can with pal, save a m3u playlist, but the name of the m3u file must have the Date of the saving


Example: 04-05-11.m3u


I know to save a playlist is:


Queue.SaveAsM3U('Location and Name');


So probably must be




And in that way save with the date, thank you very much :)

Link to comment
Share on other sites

Thank you countrywesterndj but i try to find a solution by my own this can't be so difficult jaja and here is, some Delphi manuals and everything working:


// Saving M3U with Day information.
// ================================

{This simple program just save a M3U Playlist with diferent time parameters
you must select the location and you can use this variables

MyYear - MyMonth - MyDay - MyHour - MyMin - MySec - MyMSec

Very simple, Enjoy  - GecKoTDF }

// ============================START=======================================

PAL.Loop := False; {Select if you want a Loop probably No}

//No Touch Nothing...
var Present: DateTime;
var Year, Month, Day, Hour, Min, Sec, MSec: Integer;
var myYear, myMonth, myDay, myHour, myMin, mySec, myMSec: String;
var OldTime : DateTime;
OldTime := Now;
DecodeTime(OldTime, Hour, Min, Sec, MSec);

//Decoding - Here nothing too...

PAL.LockExecution; {Go! Go! Go!}
 Present:= Now;
 DecodeDate(Present, Year, Month, Day);

 myYear := FormatDateTime('yy',Now());

 if Month     myMonth :='0'+IntToStr(Month)
    myMonth := IntToStr(Month);

 if Day     myDay :='0'+IntToStr(Day)
    myDay := IntToStr(Day);
//Hour / Minutes / Sec / Mili-Sec - No...
    myHour := IntToStr(Hour);
    myMin := IntToStr(Min);
    mySec := IntToStr(Sec);
    myMSec := IntToStr(MSec);
// Some output information. - No ¬¬ just look the Output.

 WriteLn('Today is Day ' + IntToStr(Day) + ' of Month '
 + IntToStr(Month) + ' of Year ' + FormatDateTime('yy',Now()));
 WriteLn('Time now = '+TimeToStr(OldTime));

// Create de M3U with the diferent parameters - Here Yes :D
 Queue.SaveAsM3U('C:\Chill Out - '+myDay+'-'+myMonth+'-'+MyYear+' - '+myHour+'_'+MyMin+'.m3u');


// ===============================END======================================


I made by my own and work OK :)

Link to comment
Share on other sites


This topic is now archived and is closed to further replies.

  • Create New...