home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
OS/2 Shareware BBS: 11 Util
/
11-Util.zip
/
tktools.zip
/
extract
/
killlost.cmd
< prev
next >
Wrap
OS/2 REXX Batch file
|
1994-09-26
|
926b
|
39 lines
/* This batch is an optional utility. It will read EXTRACT.SUM
and DELETE the files in your PARTIAL dir that are NOT defined
in extract.sum..
*/
e. = 0
r = 'EXTRACT.SUM' /* you may specify exact path here */
do lines=1 while lines(r)
l = linein(r)
parse var l '"'fn'","'full'",'one','two','three .
if words(fn full one two three)¬=5 then do
say 'warning: line' lines 'is invalid!'
end
fn = translate(translate(fn,'_','.'))
e.fn = 1
end
w = lineout(r,,)
'RXQUEUE /CLEAR'
'DIR /B \DOCS\S\PARTIAL | RXQUEUE'
alldel = 0
do i=1 to queued()
parse pull fn.i .
end
say i-1 'Files.'
do j=1 to i-1
fn=fn.j
fn2 = translate(fn,'_','.')
if e.fn2 then iterate
if alldel=0 then do
Say fn 'is not mentioned in EXTRACT.SUM. Erase? (Y/n/a)'
pull yn .
if left(yn,1)='A' then alldel=1
if left(yn,1)='N' Then iterate
end
'ERASE \DOCS\S\PARTIAL\'fn
end