Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!brutus.cs.uiuc.edu!wuarchive!wugate!uunet!seismo!hal!stevem From: stevem@hal.CSS.GOV (Steve Masters) Newsgroups: comp.sys.amiga.tech Subject: Re: ARexx help Message-ID: <167@hal.CSS.GOV> Date: 25 Aug 89 12:03:17 GMT References: <22442@louie.udel.EDU> Organization: ENSCO Inc., Melbourne FL Lines: 39 new@udel.EDU (Darren New) writes: >I would think this should be simple, but maybe I'm missing something. >I want to be able to say >1> cd sys:xyz/pdq >1> rx hello >SYS:xyz/pdq >Where hello.rexx contains something along the lines of: >/* hello.rexx */ >address command >'cd' >However, it seems as though SYS: is the current dir for all the >commands I start from ARexx. What am I doing wrong? According to Bill Hawes, the problem lies with the system Execute() function and the way it inherits its current directory. You are correct that the 'cd' has no effect in subsequent commands when called from ARexx. There is a work-around, however, suggested by Mr. Hawes. If you concatenate the 'cd' and the command you want with a 'newline' character, the 'cd' will apply: address command 'cd new.directory'||'0a'x||'new.command' 'New.command' will inherit the 'new.directory.' Note, however, that the current directory is reset when the command terminates. This problem has been at least partially fixed in the latest ARexx update, but I have not read the new docs closely enough to see what new coding is required. Perhaps others can post the newer, better solution. I am told that Bill Hawes' WShell also fixes this problem, but I do not own it so I am not sure. Steve Masters ENSCO, Inc. Melbourne, FL stevem@hal.CSS.GOV