home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
ftp.barnyard.co.uk
/
2015.02.ftp.barnyard.co.uk.tar
/
ftp.barnyard.co.uk
/
cpm
/
walnut-creek-CDROM
/
CPM
/
CATLOG
/
DMASTER.LBR
/
DELET.CZD
/
DELET.CMD
Wrap
OS/2 REXX Batch file
|
2000-06-30
|
3KB
|
88 lines
******DELET.CMD
ERASE
SET TALK OFF
SET EXACT ON
STOR'Y'TO ANSWER
ERASE
?' Do not use the COM, ASM, HEX, part of the file name. '
?
REMA Which file do you want to MARK for deletion?
?
ACCEPT ' BY YOUR COMMAND' TO FLD
ERASE
STOR !(FLD)TO FLD
REMA PLEASE STAND BY
USE B:FILE INDEX B:FINAME
STOR 0 TO COUNTER
STOR 0 TO LC
ERAS
FIND &FLD
DO WHIL FILE:NAME=FLD
DISP
SKIP
STOR COUNTER + 1 TO COUNTER
STOR LC + 1 TO LC
IF COUNTER > 18
REMA Press any key to continue.
WAIT
ERAS
STOR 0 TO COUNTER
ENDI
ENDD
IF LC = 0
REMARK THE FILE CALLED &FLD DOES NOT EXIST
?
REMARK PLEASE CHECK YOUR SPELLING.
?
REMARK Press any key to return to the main menu.
WAIT
RETU
ENDI
GO TOP
?
?'Which file do you want to mark for deletion by (RECORD #)?'
?
ACCEPT'BY YOUR COMMAND' TO RECNO
ERASE
IF &RECNO>0
REMA PLEASE ALLOW TIME FOR A SEARCH
USE B:FILE
DELETE RECORD &RECNO
ERAS
DISP ALL FOR *
ENDI
IF &RECNO<1
ERASE
REMARK RECORD NUMBER MUST BE>1
?
REMARK Press any key to retry.
WAIT
RETU
ENDI
?
ACCEPT'Are you sure this is the file to be deleted? (Y/N) 'TO ANSWER
IF !(ANSWER)='Y'
ERASE
SET TALK ON
USE B:FILE
REMARK PACKING MASTER FILE
PACK
ENDI
IF !(ANSWER)='N'
ERASE
REMARK Since you answered NO,let's RECALL the file.
?
REMARK Press any key to RECALL the file.
WAIT
ERAS
REMA PLEASE STAND BY
USE B:FILE INDEX B:FINAME,B:DISC,B:EXT
RECALL RECORD &RECNO
ENDI
ERAS
REMARK YOU MUST USE OPTION # 8 IF YOU HAVE DELETED ANY RECORDS.
?
REMARK Press any key to return to the main menu.
WAIT
RETU
# 8 IF YOU HAVE DELETED ANY 21DATATECHNEW 21LU3 COM CCNTS