Welcome, Guest. Please login or register.

Author Topic: DOS command  (Read 1968 times)

Description:

0 Members and 1 Guest are viewing this topic.

Offline SidewinderTopic starter

  • Full Member
  • ***
  • Join Date: Mar 2002
  • Posts: 241
    • Show only replies by Sidewinder
    • http://www.liquido2.com
DOS command
« 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.
Sidewinder
 

Offline Warface

  • Hero Member
  • *****
  • Join Date: Nov 2002
  • Posts: 970
    • Show only replies by Warface
    • http://www.spacehawks.hu
Re: DOS command
« Reply #1 on: January 05, 2003, 01:30:10 AM »
You mean "cd"? Or I misunderstood something...
 

Offline SidewinderTopic starter

  • Full Member
  • ***
  • Join Date: Mar 2002
  • Posts: 241
    • Show only replies by Sidewinder
    • http://www.liquido2.com
Re: DOS command
« Reply #2 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?
Sidewinder
 

Offline lempkee

  • Hero Member
  • *****
  • Join Date: Apr 2002
  • Posts: 2860
    • Show only replies by lempkee
    • http://www.amigaguru.com
Re: DOS command
« Reply #3 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.

Whats up with all the hate!
 

Offline Kronos

  • Resident blue troll
  • Hero Member
  • *****
  • Join Date: Feb 2002
  • Posts: 4017
    • Show only replies by Kronos
    • http://www.SteamDraw.de
Re: DOS command
« Reply #4 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
1. Make an announcment.
2. Wait a while.
3. Check if it can actually be done.
4. Wait for someone else to do it.
5. Start working on it while giving out hillarious progress-reports.
6. Deny that you have ever announced it
7. Blame someone else
 

Offline Thomas

Re: DOS command
« Reply #5 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

Offline elendil

  • Sr. Member
  • ****
  • Join Date: Nov 2002
  • Posts: 324
    • Show only replies by elendil
    • http://www.idiot.fnuck.dk
Re: DOS command
« Reply #6 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