#Filenames from ARexx?
7 messages in this thread
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.
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
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…
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
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
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