Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Space in file names: Problem with e.g. SysIsFileDirectory

70 views
Skip to first unread message

Maurice Batey

unread,
Mar 26, 2013, 1:53:14 PM3/26/13
to
Using ooRexx 4.0.1 on Linux, I've struck a problem with filenames containing
spaces,

E.g.
SysIsFileDirectory("/home/user/UKFSN list")
does not find the directory.

What method is used to get around that problem, please?
(Tried enclosing in single quotes)

--
/\/\aurice
(Retired in Surrey, UK) Registered Linux User #487649
Linux 64-bit Mageia-2:
KDE 4.8.5 Virtualbox 4.1.14 Firefox 17.0.3 Kmail 4.8.5
(Replace "nomail.afraid" by "bcs" to reply by email)

Maurice Batey

unread,
Mar 26, 2013, 2:31:22 PM3/26/13
to
On Tue, 26 Mar 2013 17:53:14 +0000, I wrote:

> SysIsFileDirectory("/home/user/UKFSN list")
> does not find the directory.

Belay that! It does now...

--
/\/\aurice

LesK

unread,
Mar 26, 2013, 2:54:23 PM3/26/13
to
On 3/26/2013 2:31 PM, Maurice Batey wrote:
> On Tue, 26 Mar 2013 17:53:14 +0000, I wrote:
>
>> SysIsFileDirectory("/home/user/UKFSN list")
>> does not find the directory.
>
> Belay that! It does now...
>
Got gremlins in your system? :-)

--

Les (Change Arabic to Roman to email me)

Rony

unread,
Mar 27, 2013, 5:56:19 AM3/27/13
to
On 26.03.2013 19:54, LesK wrote:
> On 3/26/2013 2:31 PM, Maurice Batey wrote:
>> On Tue, 26 Mar 2013 17:53:14 +0000, I wrote:
>>
>>> SysIsFileDirectory("/home/user/UKFSN list")
>>> does not find the directory.
>>
>> Belay that! It does now...
>>
> Got gremlins in your system? :-)
>

Try the ooRexx class named .File cf. (rexxref.pdf, chapter 5.4.23).

You would be able to do something like (untested):

file=.File~new("/home/user/UKFSN list") -- create a file object representing a physical file
say file~isDirectory -- is it a directory ?


Also, you might want to use that particular ooRexx class to get a listing of all files in a
directory using the list (returns an array of strings) or listFiles (returns an array of ooRexx file
objects).

---rony

Maurice Batey

unread,
Mar 27, 2013, 2:22:04 PM3/27/13
to
On Wed, 27 Mar 2013 10:56:19 +0100, Rony wrote:

> file=.File~new("/home/user/UKFSN list") -- create a file object representing a physical file
> say file~isDirectory -- is it a directory ?

Similar construct fails as follows:

3 *-* file=.File~new("/home/user/.test/space in name") -- create a file object
representing a physical file
REX0097E: Error 97 running /home/user/rx/test line 3: Object method not found
REX0476E: Error 97.1: Object ".FILE" does not understand message "NEW"

("space in name" *is* a directory!)

Rony

unread,
Mar 27, 2013, 3:01:58 PM3/27/13
to
Hi Maurice,

On 27.03.2013 19:22, Maurice Batey wrote:
> On Wed, 27 Mar 2013 10:56:19 +0100, Rony wrote:
>
>> file=.File~new("/home/user/UKFSN list") -- create a file object representing a physical file
>> say file~isDirectory -- is it a directory ?
>
> Similar construct fails as follows:
>
> 3 *-* file=.File~new("/home/user/.test/space in name") -- create a file object
> representing a physical file
> REX0097E: Error 97 running /home/user/rx/test line 3: Object method not found
> REX0476E: Error 97.1: Object ".FILE" does not understand message "NEW"
>
> ("space in name" *is* a directory!)
>

Hmm, it seems that you are using a version of ooRexx that does not have the File class implemented
according to the error message that you receive.

Not sure when the file class made it into ooRexx (I thought starting with 4.x), but ooRexx 4.1.2
(the latest version) does have it. (Just looked for a Linux box with the oldest installed ooRexx
which is at 4.1.1 and has the file class.)

Maybe you should really try to upgrade your ooRexx, if possible to the latest version.

Just try out the respective installation package from
<http://sourceforge.net/projects/oorexx/files/oorexx/4.1.2/>. If that does not work out, then you
can always try to build the latest version of ooRexx right on your box.

AFAIK there are quite a few Linux-savvy people on this list/group that can help you through (it is
rather easy, once one knows what is needed; e.g. you should have "autotools" installed as Uli
Zinngrebe mentioned, because then building and installing ooRexx becomes a breeze).


---rony



Maurice Batey

unread,
Mar 27, 2013, 3:24:31 PM3/27/13
to
On Wed, 27 Mar 2013 18:22:04 +0000, I wrote:

> Similar construct fails as follows:

On the other hand:

say SysIsFileDirectory("/home/mab/.test/space in name")

returns True.

Maurice Batey

unread,
Mar 27, 2013, 3:25:45 PM3/27/13
to
On Wed, 27 Mar 2013 20:01:58 +0100, Rony wrote:

> Just try out the respective installation package from
> <http://sourceforge.net/projects/oorexx/files/oorexx/4.1.2/>.

OK , thanks, Rony - will do in the morning...

Maurice Batey

unread,
Mar 28, 2013, 12:43:01 PM3/28/13
to
On Wed, 27 Mar 2013 20:01:58 +0100, Rony wrote:

> Just try out the respective installation package from
> <http://sourceforge.net/projects/oorexx/files/oorexx/4.1.2/

There isn't a 'respective installation' package there for Mageia
(which is RPM based, like Mandriva qnd PCLinuxOS).

I tried ooRexx-4.1.0-fedora13.i686.rpm, but it failed to install.

So i'm back to 4.0.1, I'm afraid, but it does all I need of it.

> ...you should have "autotools" installed

No sign of availabilty of that in Mageia-2.

Shmuel Metz

unread,
Mar 28, 2013, 7:58:22 AM3/28/13
to
In <pan.2013.03.26....@nomail.afraid.org>, on 03/26/2013
at 05:53 PM, Maurice Batey <mau...@nomail.afraid.org> said:

>Using ooRexx 4.0.1 on Linux, I've struck a problem with filenames
>containing spaces,

>E.g.
> SysIsFileDirectory("/home/user/UKFSN list")
>does not find the directory.

What about SysIsFileDirectory('"/home/user/UKFSN list"')?

--
Shmuel (Seymour J.) Metz, SysProg and JOAT <http://patriot.net/~shmuel>

Unsolicited bulk E-mail subject to legal action. I reserve the
right to publicly post or ridicule any abusive E-mail. Reply to
domain Patriot dot net user shmuel+news to contact me. Do not
reply to spam...@library.lspace.org

Swifty

unread,
Apr 4, 2013, 2:34:26 PM4/4/13
to
On 28/03/2013 11:58, Shmuel (Seymour J.) Metz wrote:
> What about SysIsFileDirectory('"/home/user/UKFSN list"')?

I'll admit that syntax was my first thought, but if it works, it's at
odds with all of the other interfaces I've come across which accept a
file/directory name as an argument.

stream() for example.

--
Steve Swift
http://www.swiftys.org.uk/

LesK

unread,
Apr 5, 2013, 6:59:22 AM4/5/13
to
Just a test
0 new messages