Path: utzoo!attcan!uunet!ncc!alberta!ubc-cs!van-bc!lpami From: lphillips@lpami.van-bc.UUCP (Larry Phillips) Newsgroups: comp.sys.amiga Subject: Re: Sources in text mode please Message-ID: <1758@van-bc.UUCP> Date: 14 May 88 20:24:49 GMT Sender: lpami@van-bc.UUCP Lines: 105 In <8805130331.AA29993@cory.Berkeley.EDU>, dillon@CORY.BERKELEY.EDU (Matt Dillon) writes: > I agree with one exception. When the distribution requires a > directory structure to be maintained, or has lots of files with > long filenames, ZOO should be used... Look at the ARP distribution? > It took me hours to fix up all those ARC'd segments.... Yes, I like to be able to use long names in archives, and to preserve the directory structure too, so I have a present for you at the end of this posting. > This is why DNET is being distributed on sources as a uuencoded > ZOO archive... There is no other way to maintain the directory > structure and I wasn't about to hand-generate the ARCs or split > everything into a thousand singular-directory files and provide > a script to restore it. > And I'm a convert, BTW. A month ago I didn't like ZOO. But now.... > > -Matt Up to a few days ago, I hated ZOO with a vengeance. There were a few reasons for this, like the distribution policy which virtually ensured that it would be useless to me as a sysop on Compuserve's Amigaforum. A few days ago, we received an upload of the latest version of ZOO to the Amigaforum from the author himself, and it did not have the restrictions it previously had. There remains only one small problem. ZOO does not work on any device that uses the new file system, meaning that I have to ZOO things in VD0: or RAM: It would seem that extracting files is fine, but that it must go a little too 'close to the hardware', bypassing the file handler and making assumptions about disk block contents. A shame. I _almost_ like it now. And now for something completely different. A small ARexx program called arcall.rexx, that will recursively go through a directory and rename all files, generate a script file while doing so, and ARC the entire kabooble into a file called ARCFILE.ARC. The script file created, (a standard Amigados script called Exec.me) is included in the ARC, and upon execution, will make any necessary subdirectories, and rename all files to their original name and position in the directory structure. It is short, so I will include it here, with apologies to the net.gods if I have misinterpreted the guidelines. ---------- slice here ---------------- /* arcall.rexx by Larry Phillips. Use this code in whatever way you like. */ arg root if right(root,1) ~= ':' then root = root || '/' if root = '/' then root = '' filecount = 1 dummy = open(execfile,root || 'Exec.me','write') call renamefiles(root) say call close(execfile) 'arc a arcfile *' exit 0 renamefiles: procedure expose filecount root parse arg x contents = showdir(x); do i = 1 to words(contents) temp = x || word(contents,i) select when word(statef(temp),1) = 'FILE' then do rename temp root || 'File' || filecount call writeln(execfile,'rename File' || filecount x || word(contents,i)) call writech(stdout,'.') filecount = filecount + 1 end when word(statef(temp),1) = 'DIR' then do call writeln(execfile,'') call writeln(execfile,'makedir' temp) call renamefiles(temp || '/') end otherwise do if translate(temp) = 'EXEC.ME' then break else say 'Error: File' temp 'is neither DIR nor FILE.' end end end call writeln(execfile,'') return 0 ---------- slice here - end of program ---------------- Enjoy -larry -- Janus? Well, look at it this way. If you squint a little, the J could be Amiga checkmark, and the rest of the word describes MsDos. +----------------------------------------------------------------+ | // Larry Phillips | | \X/ {ihnp4!alberta!ubc-vision,uunet}!van-bc!lpami!lphillips | | COMPUSERVE: 76703,4322 | +----------------------------------------------------------------+