Amiga.org

Amiga computer related discussion => Amiga Software Issues and Discussion => Topic started by: Sidewinder on January 05, 2003, 01:23:44 AM

Title: DOS command
Post by: Sidewinder on January 05, 2003, 01:23:44 AM
Hello, I'm at work and do not have my official AmigaDOS reference handy, but I need to find a command or trick to return the current directory.  Any ideas?

Thanks.
Title: Re: DOS command
Post by: Warface on January 05, 2003, 01:30:10 AM
You mean "cd"? Or I misunderstood something...
Title: Re: DOS command
Post by: Sidewinder on January 05, 2003, 01:30:23 AM
Ok, here's the deal, I figured out that CD returnes the current dir, but does anyone know how to use that in an install script? I've tried this:

(set @source (run ("cd")))

But it doesn't work.  Any other ideas?
Title: Re: DOS command
Post by: lempkee on January 05, 2003, 02:28:12 AM
hm mm  its "/" T retrace to a dir , ie if your in sys:C/  then u type / to get back to Sys:

was it this u meant??

if not, if your talking of setting a primary dir then its "VOLUME request(ie sys:c/)"  then on new line CD + path!

hope its what u meant.

Title: Re: DOS command
Post by: Kronos on January 05, 2003, 02:40:39 AM
Don't know if this is what you want, but I just tried this:
cd sys:
cd > ram:x
cd ram:
cd ? <  x

and I was back on sys:  :-D
Title: Re: DOS command
Post by: Thomas on January 05, 2003, 10:48:19 AM

What about

(run ("cd >env:current"))
(set #source (getenv "current"))

Did you examine the variable @execute-dir ? Documentation says it can be used to change the current directory but perhaps it already contains something if you read it.

You must not use names beginning with @ for your own variables. These are reserved for internal names. Why don't you read the documentation ?

Why do you want to know the name of the source directory ? Your current directory is the source directory, so you can just use "" as source.

Bye,
Thomas
Title: Re: DOS command
Post by: elendil on January 05, 2003, 10:59:17 AM
@kronos:

Cool. I have to try that. My cd experience is limited to 'cd ' :)

Sincerely,

-Kenneth Straarup