Path: utzoo!attcan!uunet!lll-winken!lll-lcc!lll-tis!ames!pacbell!att!alberta!ubc-cs!van-bc!lpami From: lphillips@lpami.van-bc.UUCP (Larry Phillips) Newsgroups: comp.sys.amiga Subject: REXX archiver (was Re: Sources in text mode please) Message-ID: <1770@van-bc.UUCP> Date: 18 May 88 00:50:57 GMT Sender: lpami@van-bc.UUCP Lines: 37 In <3580@ece-csc.UUCP>, rss@ece-csc.UUCP (Ralph Scherp) writes: >You use the "SHOWDIR" function to get a directory list. The one problem >with this is that SHOWDIR returns a complete list of filenames, separated >by spaces. AmigaDOS filenames can contain spaces [and often do, when >the files are intended for WBench use rather than CLI]; so parsing out >individual names by breaking up the list returned by SHOWDIR can break >occasionally. Yes... my CLI propensity showing through. All files I have any say in are named without using spaces and it just slipped my mind. >I don't mean this is a flame, just an observation, I'm wondering if their >is a way around this problem. Yes there is, but I suspect it won't be pretty. One thought is to check for the filename on a word by word basis as in the original, and when it returns saying the file isn't there, try it with two words, three words, etc. One other technique that might work is using OVERLAY() to map the SHOWDIR onto a string with delimiters already in it. It will depend on whether the space between filenames is treated in the same way as the space within a filename by the SHOWDIR function. I'll play with it. -larry PS: Just spoke to Bill Hawes, and he tells me that SHOWDIR will, in the next update to ARexx, take an additional parameter. It will be a 'separator' character that will separate the actual file names, leaving the spaces alone. -- 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 | +----------------------------------------------------------------+