Discussion:
Set working directory
Add Reply
Richard Ashbery
2019-10-20 12:44:38 UTC
Reply
Permalink
I can set the current working directory by clicking into the directory
where my BASIC files are held and use 'Set directory' from the 'Filer'
window. I often forget so when I run the first program containing a
CHAIN keyword it fails (can't find next program). It would be easier
to double-click an obeyfile (perhaps called !RUN_FIRST) to do this but
the one tried below doesn't work.

Pseudo application directory with !Boot and !Run obeyfiles
containing...

Set Graphics_sequence$Dir <Obey$Dir>.^ (!Boot)

/<Obey$Dir>.!Boot (!Run)

Any solution please?
Steve Fryatt
2019-10-20 13:54:01 UTC
Reply
Permalink
On 20 Oct, Richard Ashbery wrote in message
Post by Richard Ashbery
I can set the current working directory by clicking into the directory
where my BASIC files are held and use 'Set directory' from the 'Filer'
window. I often forget so when I run the first program containing a CHAIN
keyword it fails (can't find next program). It would be easier to
double-click an obeyfile (perhaps called !RUN_FIRST) to do this but the
one tried below doesn't work.
If all you're trying to do is set the current working directory, then surely
an obey file containing simply

Dir <Obey$Dir>

would do it?

If you add back in the complexity of the application folder, then

Dir <Obey$Dir>.^

would set the directory to that within which the application lives. I'm not
sure why you need that, though.
--
Steve Fryatt - Leeds, England

http://www.stevefryatt.org.uk/
Richard Ashbery
2019-10-20 14:36:29 UTC
Reply
Permalink
Post by Steve Fryatt
On 20 Oct, Richard Ashbery wrote in message
Post by Richard Ashbery
I can set the current working directory by clicking into the
directory where my BASIC files are held and use 'Set directory'
from the 'Filer' window. I often forget so when I run the first
program containing a CHAIN keyword it fails (can't find next
program). It would be easier to double-click an obeyfile (perhaps
called !RUN_FIRST) to do this but the one tried below doesn't
work.
If all you're trying to do is set the current working directory,
then surely an obey file containing simply
Dir <Obey$Dir>
would do it?
If you add back in the complexity of the application folder, then
Dir <Obey$Dir>.^
would set the directory to that within which the application lives.
I'm not sure why you need that, though.
I vaguely remember I had a method that did this and the one I dug up
was the one above (I believe from Martin Bazley). Method seemed hugely
over complicated and doesn't work anyway.

Yes of course you are right Dir <Obey$Dir> is all that's needed. I've
done this before but forgotten how - very annoying I should forget a
simple thing like that.

Many thanks Steve

Richard

Loading...