home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Amiga Format 126
/
af126a.adf
/
Football.lzx
/
football
/
user
/
Cup_CloseCup.rexx
< prev
next >
Wrap
OS/2 REXX Batch file
|
1999-05-22
|
2KB
|
93 lines
/* ***********************************************************************
CLOSE CUP PROGRAM FOR FOOTBALL REXX SUITE
-------------------------------------------
Copyright Mark Naughton 1999
Version Date History
--------------------------------------------------------------------------
1.0 210499 First release.
**************************************************************************
Procedure
---------
1. Check files.
2. Setup new filename.
3. Rename files.
4. Output message.
************************************************************************** */
PARSE ARG league_file
version = 1
input_file = '.cf'
input2_file = '.scf'
input3_file = '.cfrw'
input4_file = '.cfh'
league_stuff = "Data/"league_file
if exists(league_stuff||input_file) = 0 then exit
if exists(league_stuff||input2_file) = 0 then exit
if exists(league_stuff||input3_file) = 0 then exit
if exists(league_stuff||input4_file) = 0 then exit
today = date()
month = strip(word(today,2))
year = substr(word(today,3),3,2)
nleague_file = league_file"_"month||year
f1 = league_stuff||input_file" as Data/"nleague_file||input_file
address command 'c:Rename >NIL: 'f1
f1 = league_stuff||input2_file" as Data/"nleague_file||input2_file
address command 'c:Rename >NIL: 'f1
f1 = league_stuff||input3_file" as Data/"nleague_file||input3_file
address command 'c:Rename >NIL: 'f1
say
say center("Close Cup",78)
say "-------------------------------------------------------------------------------"
say
say
say " CloseCup has renamed all files with the cup-name '"league_file"' to :"
say
say " '"nleague_file||input_file"'"
say " '"nleague_file||input2_file"'"
say " '"nleague_file||input3_file"'"
say
say
if exists(league_stuff||input4_file) > 0 then do
say " The history file, '"league_file||input4_file"' will remain the same."
say
say " Further cups can use this same cup-name and a history of the competition"
say " can be recorded."
say
say
say
say " 1. Import '"nleague_file||input_file"' into SETUP CUP."
say
say " 2. Change the settings and/or the teams."
say
say " 3. Save the cup as '"league_file"' and hey presto!"
say
say
end
say
say "-------------------------------------------------------------------------------"
say
exit