Amiga.org
Amiga computer related discussion => Amiga Software Issues and Discussion => Topic started 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.
-
You mean "cd"? Or I misunderstood something...
-
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?
-
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.
-
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
-
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
-
@kronos:
Cool. I have to try that. My cd experience is limited to 'cd ' :)
Sincerely,
-Kenneth Straarup