(view source code of cdlist.cmd as plain text)
/*
浜様様様様様様様様様様様様様様様様様様様様様様様様様様様様様様様様様様様様様
CDlist: Creates a list of all CDs in CDP.INI and writes it to CDPTXT.INI
Written by Rob van der Woude
Latest revision: 1999/08/02
Use this program together with CDadd.cmd to save (and edit if you like)
the list of CD titles and songs from MMOS2's CDP.INI in ASCII format.
Please feel free to use, distribute and modify this program.
However, do so entirely at your own risk.
The author cannot be held responsible for any damage or loss of data,
caused by the use or inability to use this program.
If you modify this program, please document the modifications.
I would also like to receive an e-mail message stating the nature of the
modifications.
藩様様様様様様様様様様様様様様様様様様様様様様様様様様様様様様様様様様様様様
*/
/* Initialize RexxUtil */
call RxFuncAdd "SysLoadFuncs", "RexxUtil", "SysLoadFuncs"
call SysLoadFuncs
/* Find full path to MMOS2's CD Player's INI files */
mmbase = strip( value( "MMBASE", , "OS2ENVIRONMENT" ), "T", ";" )
cdpini = mmbase||"\CDP.INI"
cdptxt = mmbase||"\CDPTXT.INI"
cdpbak = mmbase||"\CDPTXT.BAK"
/* Check if CDP.INI exists */
call SysFileTree cdpini, "found.", "F"
if found.0 <> 1 then do
call SysCls
say "[0m"
call beep 880, 250
say " CDP.INI not found!"
say ""
exit
end
/* Check if ASCII version alreasy exists; if so, either delete or rename it */
call SysFileTree cdptxt, "exist.", "F", , "**---"
freq = 220
if exist.0 = 1 then do forever
call beep freq, 250
say "[0m"
say " File "||cdptxt||" already exists; do you want to [1mr[0mename it and create"
say " a new file or do you want to [1md[0melete the old file? [rd]"
call SysCurState "OFF"
answer = translate( SysGetKey( "NOECHO" ) )
call SysFileTree cdpbak, "exist.", "F", , "**---"
if answer = "R" then do
if exist.0 = 1 then address CMD "@CMD /C DEL "||cdpbak
address CMD "@CMD /C REN "||cdptxt||" *.BAK"
leave
end
if answer = "D" then do
address CMD "@CMD /C DEL "||cdptxt
leave
end
freq = freq * 2
if freq > 3000 then freq = 220
end
/* Write header */
call SysCls
string = "Text version of CDP.INI"
say string
call lineout cdptxt, ";"||string
string = date()||" "||time()
say string
call lineout cdptxt, ";"||string
call lineout cdptxt, ""
/* Lijst met CD's */
call SysIni cdpini, "ALL:", "cd."
if cdlist.0 > 0 then do i=1 to cd.0 by 1
call SysIni cdpini, cd.i, "ALL:", cd.i.
if cd.i.0 > 0 then do j=1 to cd.i.0 by 1
if cd.i.j = "IMMCDDiscTitle" then do
string = "["||translate( SysIni( cdpini, cd.i, cd.i.j ), "()", "[]" )||"]"
say "[4;1H"||string||"[K"
call lineout cdptxt, string
string = " Checksum = "||cd.i
say "[5;1H"||string||"[K"
call lineout cdptxt, string
string = " IMMCDDiscTitle = "||SysIni( cdpini, cd.i, cd.i.j )
say "[5;1H"||string||"[K"
call lineout cdptxt, string
end
end
if cd.i.0 > 0 then do j=1 to cd.i.0 by 1
if abbrev( cd.i.j, "IMMCDDisc" ) = 0 then do
string = " "||cd.i.j||" = "||translate( SysIni( cdpini, cd.i, cd.i.j ), "; ", "0D0A"X )
say "[5;1H"||string||"[K"
call lineout cdptxt, string
end
else do
if cd.i.j <> "IMMCDDiscTitle" then do
string = ' '||cd.i.j||' = "'||c2x( SysIni( cdpini, cd.i, cd.i.j ) )||'"X'
say "[5;1H"||string||"[K"
call lineout cdptxt, string
end
end
end
call lineout cdptxt, ""
end
call lineout cdptxt
page last modified: 2024-04-16; loaded in 0.0059 seconds