home *** CD-ROM | disk | FTP | other *** search
- /*H* CHORES.REX 12-24-92 09:56 */
- Parse Arg prog parms
- prog=translate(prog)
- me=prog
- Parse source sys .
- sys.=0
- if sys='OS/2' then sys.os2=1
- else if sys='PCDOS' then sys.dos=1
- If arg(1)=? Then Exit tell(me)
- i=lastpos('\',prog)
- If i>0 Then prog=substr(prog,i+1)
- again?=0
- Call find_program parms
- Exit
- FIND_PROGRAM:
- Signal On syntax /*trap unknown program*/
- Signal Value prog
- SYNTAX:
- If again? Then Say 'Coding error in program' prog
- Else Say "program" prog "not found in CHORES"
- again?=1
- Exit
-
- BKUP:
- Trace o?r
- call bkupa
- call bkupc
- exit
-
- BKUPA:
- Trace o?r
- If parms='' Then parms=0
- Parse Value parms With dayssincebkup ext
- Say 'Doing backup of a: Drive:'
- say ' Please insert backup disk in drive b:'
- 'cd b:\'
- do n=1
- say ' Please insert original disk in drive a:'
- Say ' Hit enter to continue or'
- Say ' N to exit'
- ans=translate(inkey())
- if ans='N' then leave
- 'c:\bin\pcopy a:\*.* b:\ /d:)'dayssincebkup+2'/dc/b/ba/s/nw/ex/np/u/o:*.BAK,*.AUS,AA*.*,*.LOG,*.DIR'
- 'dir b:\*.'
- End
- 'cd \'
- 'c:'
-
- return; BKUPC:
- If parms='' Then parms=0
- Parse Value parms With dayssincebkup ext
- Say 'Doing backup of C Drive, please insert backup disk in drive a:'
- 'cd a:\'
- Do 1
- Say ' Hit enter to continue or'
- Say ' N to exit'
- ans=translate(inkey())
- if ans='N' then leave
- 'C:\BIN\PCOPY C:\*.* A:\ /D:)'dayssincebkup+2'/DC/B/BA/S/NW/EX/NP/U/O:*.BAK,'EXT',*.AUS,AA*.*,*.LOG,*.DIR,SWAPPER.DAT'
- 'dir a:\*.'
- End
- 'cd \'
- 'c:'
- return;
- date=date('o')
- date='ZZ'left(date,2)substr(date,4,2)right(date,2)
-
- return; CATDISK:
- Arg filespec
- drive=dosdrive()
- i = pos(':',filespec)
- If i=2 Then Do
- drive=left(filespec,1)
- filespec=substr(filespec,3); End
- Queue 'c:\bin\w.exe' drive':'filespec
-
- Return; CHAIN:
- fid = 'e:\chain.bat'
- Call dosdel(fid)
- Call lineout fid
- If trace()<>'?R'
- Then sw='off'
- Else sw='on'
- Call lineout fid, '@echo' sw
- Call lineout fid, 'set pr=%PROMPT%'
- Call lineout fid, 'SET PROMPT=[Type EXIT To return]$p$g'
- Do n=1 While l.n<>''
- Call lineout fid, l.n
- End
- Call lineout fid, 'SET PROMPT=%pr%'
- Call lineout fid, 'set pr='
- /*call lineout fid, 'call reset.bat'*/
- Call lineout fid, sourcedrive':'
- Call lineout fid, 'cd' Source
- Call lineout fid
- Queue fid
-
- Exit; COPYL: /* COPY FILES FROM SOURCE DATED WITHIN THE LAST 2 DAYS ONLY */
- Arg p1 p2 p3 p4 p5
- If p1='' Then p1='b:*.*'
- If p2='' Then p2='c:\test\'
- /* calculate yesterday */
- date=date('O')
- day=substr(date,7,2)-1
- mo=substr(date,4,2)
- yr=substr(date,1,2)
- If lt? Then Say 'Mount disk in drive b:'
- 'c:\dos\xcopy' p1 p2 '/p /s /D:'mo'-'right(day,2,0)'-'yr
-
- Exit; GST:
- traCE o?R
- l.1='c:'
- l.2='cd \123'
- l.3='c:\rexx\press.exe' 'DELAY 2 /FR CURR CURR CURR ENTER'
- l.4='123'
- Call chain
- /*push 'b prog 123'
- exit*/
-
- HIST:
- Say " Do you wish To run family history? (Y/N)"
- Do 10
- Call delay .5
- ans=inkey('N')
- If ans<>'' Then Leave
- End
- If upper(ans)='Y' Then Queue 'faminit'
-
- Exit; LISTMACS:
- f = 'c:\ram2\macs.bat'
- macs =
- Call lineout f
- Say ' DOSKEY MACROS'
- Do Forever While lines(f)
- n=1
- Do Forever While lines(f)
- line=linein(f)
- If word(line,1) <> 'e:doskey' Then Iterate
- word= word(line,2)
- word=word(translate(word,' ','='),1)
- macs= macs left(word,8)
- n=n+1
- If n>8 Then Leave
- End
- Say macs
- macs=
- End
- Say macs
-
- Exit; PCTBKUP:
- Say "Before running BACKUP you must have run WARM and REM'ed out SMARTDRV"
- Say 'Do you want To continue? Y/N'
- Pull ans
- If ans = 'Y' Then Do
- Queue 'set pctools=c:\pctbkup\files'
- Queue 'set cptmp=e:\'
- Queue 'c:\bin\release last.tsr'
- Queue 'c:\bin\release misc.tsr'
- Call program 'd:\pctbkup\pcbackup.exe c:'
- End
-
- Exit; PRTSPOOL:
- If state('c:\spool\*.*')=0 Then Queue ' C:\rexx l.rex print c:\spool\*.*'
- Exit; SPELL:
- Arg fileid '/'editor
- Call dosdrive sourcedrive':'
- Call doschdir Source
- editor='WP'
- If editor='' Then Do
- SAY 'WHAT EDITOR: WP OR PCTOOLS? (WP IS DEFAULT)'
- Pull editor; End
- If editor='PCT' Then Do
- file='spell.ovl'
- If lines('e:'file) = 0 Then 'copy d:\pct\'file 'e:'file '>nul'
- Push ' d:\pct\desktop'
- ' d:\rexx\press.exe' 'ENTER' fileid 'ENTER F7'; End
- Else Do
- Push ' d:\WP\WP.exe' fileid
- ' d:\rexx\press.exe' 'C-F2 3 ENTER'; End
-
- Exit; STATE:
- Arg specs
- If pc? Then Do
- If dosdir(specs)='' Then rc=28
- Else rc=0; End
- Else 'STATE' specs
-
- Return rc; THES:
- Exit msg(me,10,"Not working now")
- Arg fileid
- Push 'c:\WP\WP.exe' fileid
- 'd:\rexx\press.exe' 'A-F1'
-
- Exit; USE:
- Push macro use
- Push 'x lasting.glv'
- Exit
-