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
/
ENTERPRS
/
CPM
/
UTILS
/
A
/
DBASE2.ARC
/
FILECABS.CMD
< prev
next >
Wrap
OS/2 REXX Batch file
|
1992-12-05
|
6KB
|
271 lines
USE filecabs index filecabs
IF val(option)>0
@ 18,0
@ 16,0
ENDI
STOR T to cabinets
DO WHIL cabinets
SET intensity off
@ 3,54 say chr(27)+chr(94)
@ 3,54 say 'FILING CABINET SUBSYSTEM'
@ 3,78 say chr(27)+chr(113)
SET intensity on
@ 5,50 say 'A - Log alternate disk/cabinet'
@ 6,50 say 'B - Display folders in cabinet'
@ 7,50 say 'C - Browse/edit files database'
@ 8,50 say 'D - Display the disk directory'
@ 9,50 say 'E - Delete file from directory'
@ 14,50 say 'R - Return to main system menu'
SET intensity off
IF val(option)>0
@ 16,54 say "Option (0-9; A-E or R)? "
SET console off
WAIT to option
SET console on
IF val(option)>0 .or. option='0'
DO changeop
RETU
ENDI
ELSE
@ 16,54 say "Option (A-E or R)? "
SET console off
WAIT to option
SET console on
ENDI
DO CASE
CASE !(option)='A'
ERAS
USE
RESE
STOR T to filecabs
STOR F to cabinets
STOR F to handy
CASE !(option)='B'
STOR T to filefold
DO WHIL filefold
ERAS
SET intensity on
@ 17,0 say '-------------------------------------------------------------------
SET intensity off
@ 18,0 say 'Enter one of the following single letter commands:'
SET intensity on
@ 19,0 say 'A)dd E)dit P)age Q)uit R)estart S)elect'
GOTO top
@ 2,0
@ 2,0 say 'FILE CABINET FOLDERS'
SET intensity off
STOR 4 to line
STOR 2 to column
STOR # to number
DO WHIL line<15 .and. .not. eof
IF document='FOLDER'
@ line,column say foldname
STOR column+20 to column
IF column>62
STOR line+2 to line
ENDI
ENDI
SKIP
ENDD
STOR ' ' to action
DO WHIL !(action)#'Q' .and. !(action)#'P'
@ 20,0
WAIT to action
IF !(action)='A'
STOR ' ' to title
@ 22,0
@ 22,0 say 'Please enter new folder title ';
get title picture 'XXXXXXXXXXXXXXX'
READ
IF line<15 .and. column<63
@ line,column say title
STOR column+20 to column
IF column>62
STOR line+2 to line
ENDI
ENDI
GOTO bottom
APPE BLAN
REPL foldname with title,document with 'FOLDER',doc:date with holddate
GOTO number
@ 22,0
ENDI
IF !(action)='E'
GOTO top
BROW
PACK
GOTO number
ENDI
IF !(action)='R'
GOTO top
STOR 'P' to action
ENDI
IF !(action)='P'
@ 22,0
STOR 4 to line
DO WHIL line<15
@ line,0
STOR line+1 to line
ENDD
ENDI
IF !(action)='Q'
STOR F to filefold
ENDI
IF !(action)='S'
STOR ' ' to title
@ 19,42
@ 22,0
@ 22,0 say 'Please enter name of selected file folder ';
get title picture 'XXXXXXXXXXXXXXX'
READ
STOR 4 to line
DO WHIL line<15
@ line,0
STOR line+1 to line
ENDD
SET intensity on
@ 2,0 say 'DOCUMENT FOLDER - '+!(title)
SET intensity off
GOTO top
@ 3,0
DISP next 12 document,doc:date,filename for foldname=!(title)
STOR ' ' to op
DO WHIL !(op)#'Q'
IF !(op)#'P'
@ 22,0
@ 20,0
WAIT to op
ENDI
IF !(op)='A'
APPE BLAN
REPL foldname with !(title)
SET intensity on
EDIT #
IF doc:date=' '
REPL doc:date with holddate
ENDI
ELSE
IF !(op)='E'
STOR 0 to recnum
@ 22,0
@ 20,0
INPU 'Enter number to left of record to edit' to recnum
GOTO recnum
SET intensity on
EDIT #
ELSE
IF !(op)='P' .or. !(op)='R'
IF eof .or. !(op)='R'
GOTO top
ENDI
@ 3,0
DISP next 12 document,doc:date,filename for foldname=!(title)
STOR ' ' to op
ELSE
@ 22,0
STOR 'Q' to action
ENDI p
ENDI e
ENDI a
IF !(op)='A' .or. !(op)='E'
ERAS
SET intensity on
@ 2,0 say 'DOCUMENT FOLDER - '+!(title)
@ 17,0 say '-------------------------------------------------------------------------------'
SET intensity off
@ 18,0 say 'Enter one of the following single letter commands:'
SET intensity on
@ 19,0 say 'A)dd E)dit P)age Q)uit R)estart'
STOR 'P' to op
ENDI
ENDD
ENDI
ENDD
ENDD
CASE !(option)='C'
GOTO top
BROW
PACK
CASE !(option)='D'
ERAS
STOR ' ' to type
@ 2,0 say 'Please enter complete file name (wildcards are accepted)';
get type picture 'XXXXXXXXXXXX'
READ
ERAS
?
? 'Current files on disk in drive B of name/type '+trim(type)+' are -'
?
DISP files like &type
?
? 'Press RETURN to return to menu...'
SET console off
WAIT to return
SET console on
CASE !(option)='E'
ERAS
STOR ' ' to type
@ 2,0 say 'Please enter complete file name';
get type picture 'XXXXXXXXXXXX'
READ
DELE file &type
CASE !(option)='R'
STOR F to cabinets
RELE filecabs
ENDC
IF !(option)#'R'
ERAS
? '.______________.______________.'
? '| | |'
? '| :--: | :--: |'
? '| | |'
? '| | |'
? '| | |'
? '|--------------|--------------|'
? '| | |'
? '| :--: | :--: |'
? '| | |'
? '| | |'
? '|______________|______________|'
? '| | |'
? '| :--: | :--: |'
? '| | |'
? '| | |'
? '|______________|______________|'
? '!______________!______________!'
ENDI
ENDD
RETU
DER'
@ line,column say foldname
STOR column+20 to column
IF column>62
STOR line+2 to line
ENDI
ENDI
SKIP
ENDD
STOR ' ' -: |'
? '| | |'
? '| | |'
? '|______________|______________|'
? '| | |'
? '| :--: | :--: |'
? '| | |'
? '| | |'
? '|______________|______________|'
? '!______________!______________!'
ENDI
ENDD
RETU
DER'
@ line,column say foldname
STOR column+20 to column
IF column>62
STOR line+2 to line
ENDI
ENDI
SKIP
ENDD
STOR ' ' action
DO