home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
OS/2 Shareware BBS: 18 REXX
/
18-REXX.zip
/
sprd.zip
/
spread.cmd
< prev
Wrap
OS/2 REXX Batch file
|
1995-04-12
|
1KB
|
36 lines
/* Find all zipfiles in this directory */
if RxFuncQuery('SysLoadFuncs') THEN
do
/*-- load the load-function --*/
CALL RxFuncAdd 'SysLoadFuncs', 'RexxUtil', 'SysLoadFuncs'
/*-- load the Sys* utilities --*/
CALL SysLoadFuncs
end
if 0 < arg() then
do
say "This program will find all zip files with the Archieve attribute set,"
say " create a subdirectory with the name of the zip file, move the"
say " zip file to that subdirectory, unzip the file, clear the Archieve bit"
say " and move the zip file back to the original directory."
say ""
say "This program assumes REXX is installed and unzip.exe is on the path or in"
say " the directory where spread.cmd is being run."
return
end
call SysFileTree '*.zip', 'file', 'FO','+****'
do i=1 to file.0
file.i = translate(file.i,' ','.\')
x = words(file.i)
file.i = word(file.i,x-1)
say file.i
'@md 'file.i
'@cd 'file.i
'@move ..\'file.i'.ZIP .'
'@unzip 'file.i
'@attrib 'file.i'.zip -a'
'@move 'file.i'.ZIP ..'
'@cd ..'
end