Path: utzoo!utgpu!jarvis.csri.toronto.edu!rutgers!att!alberta!ubc-cs!van-bc!resrch From: lphillips@lpami.wimsey.bc.ca (Larry Phillips) Newsgroups: comp.sys.amiga Subject: Re: Zoo problem (was: Re: A neat configuration for AmigaTeX...) Message-ID: <2411@van-bc.UUCP> Date: 14 May 89 16:43:07 GMT Sender: resrch@van-bc.UUCP Lines: 62 In <709@solaria.csun.edu>, ecphssrw@io.csun.edu (Stephen Walton) writes: >In article <11300@bloom-beacon.MIT.EDU>, cthulhu@athena (Jim Reich) writes >>In article <8904300253.AA09616@jade.berkeley.edu> CRONEJP@UREGINA1.BITNET (Jonathan Crone) writes: >>>I know that you can use ZOO to archive an entire directory >>>heirarcy.... >>No, as far as I can tell, zoo only supports one level of wildcarding >You use the I (capital eye) switch to Zoo, which means to read the >list of files to back up from standard input. Then, to your shell, >you say: >find "" -name * -print | zoo aI allfiles >or, if you don't have a pipe shell handy: >1> run find >pipe:list "" -name * -print >[CLI 2] >1> zoo Works fine. You need find of course; it might be possible to do >it with List lformat=%s%s, but I dunno. ----------------------------------- /* ZooAll.rexx - Add all files in a directory structure to a Zoo archive */ /* cd to appropriate directory and invoke this */ parse arg x if length(x) = 0 then do say 'Usage: ZooAll ' exit end zoo 'a' x '*' call zoodirs('') exit /* recursive procedure to do all directories */ zoodirs: procedure expose x parse arg base temp = showdir(base,'d') if base ~= '' then base = base || '/' if length(temp) >0 then do do i=1 to words(temp) if length(showdir(base || word(temp,i),'f')) >0 then zoo 'a' x base || word(temp,i) || '/*' if base = '' then call zoodirs(word(temp,i)) else call zoodirs(base || word(temp,i)) end end return 0 -- - Don't tell me what kind of a day to have! - +----------------------------------------------------------------------+ | // Larry Phillips | | \X/ lphillips@lpami.wimsey.bc.ca or uunet!van-bc!lpami!lphillips | | COMPUSERVE: 76703,4322 | +----------------------------------------------------------------------+