CompuServe Thread

#Filenames from ARexx?

7 messages in this thread
#20058From: SyndesisFeb 6, 1992 2:29 PM
I'm working on an ARexx program to perform actions on all the files in a given directory. I'd like it to be free of restrictions. Using SHOWDIR() to get a list of space-separated filenames isn't perfect – it gladly concats filenames with spaces into the "list", turning one file into three that don't exist. Of course, I could parse the output of 'ls' or 'LIST' or whatever. Is there a better, more foolproof, more portable way? I'd also like to detect directories, too, so this routine could recurse if necessary.
#20063From: Bill HawesFeb 6, 1992 4:12 PM
The ARexx Showdir() function will accept a third argument specifying a separator character, which can be anything including a null byte ('00'x in REXX.) The second argument to showdir() can be an 'F' or 'D' for files or dirs, if you need to distinguish between these cases. -Bill Hawes
#20067From: SyndesisFeb 6, 1992 6:15 PM
Where does the manual say that? Maybe I need a new manual. Of the examples of SHOWDIR() I've seen in the library, none of them seem to worry about this, except for one that uses a function called 'FileList()', but the docs don't indicate which add-on library handles that…
#20068From: QuintenFeb 6, 1992 7:37 PM
I bought Arexx from a friend who bought an A3000 (as Arexx goes with it). In the docs that come with 2.0 there I discovered a few features that are not included in my manual. Maybe it would be a good idea to ask bill Hawes to post an update of the docs in the libs. I hope that the missing details will show up somewhere. — Quinten Martens
#20080From: Bill HawesFeb 7, 1992 7:15 AM
Check in the update.doc file on the ARexx distribution disk for more info on the showdir() function. FileList() is part of rexxarplib and should be described in the docs there. -Bill Hawes
#20107From: John DraperFeb 8, 1992 12:06 AM
None of my scripts worries about spaces in filenames, because I rename them whenever I find them, or throw them away if they require the spaces. -larry
#20117From: SyndesisFeb 8, 1992 9:44 AM
I guess that's one solution to the problem. 🙂 Too bad you didn't write a script to do it. I remember once having your 'zooall' fail, but I never figured out why. The SHOWDIR() space problem was the reason.