[net.micro.amiga] Execute question

dillon@ucbvax.BERKELEY.EDU (Matt Dillon) (01/02/86)

	I have a question on the Execute() and related commands, and on CD.
I would like to change my current working directory from a program (my own
shell), and can't seem to do it Execute("cd....",0 ,0) doesn't effect anything.

	Which comes to my next question: Even when I use Execute() with a fully
specified path, it still seems to try to follow c:  ??? 

				Thanx,

				-Matt

mykes@3comvax.UUCP (Mike Schwartz) (01/02/86)

In article <11327@ucbvax.BERKELEY.EDU> dillon@ucbvax.BERKELEY.EDU (Matt Dillon) writes:
>
>	I have a question on the Execute() and related commands, and on CD.
>I would like to change my current working directory from a program (my own
>shell), and can't seem to do it Execute("cd....",0 ,0) doesn't effect anything.
>
>	Which comes to my next question: Even when I use Execute() with a fully
>specified path, it still seems to try to follow c:  ??? 
>
>				Thanx,
>
>				-Matt


I posted a program called MyCLI to this newsgroup that does CD's inside
a program.  YOU MUST HAVE THE "RUN" PROGRAM IN YOUR C: DIRECTORY for
the Execute() function to work at all.  Using Execute() to do a CD is
overkill, though.  See MyCLI.c for an example of how to use the AmigaDos
CurrentDirectory() function, or consult your AmigaDos technical reference
guide.

mike schwartz

bruceb@amiga.UUCP (Bruce Barrett) (01/03/86)

In article <11327@ucbvax.BERKELEY.EDU> dillon@ucbvax.BERKELEY.EDU (Matt Dillon) writes:
>
>	I have a question on the Execute() and related commands, and on CD.
>I would like to change my current working directory from a program (my own
>shell), and can't seem to do it Execute("cd....",0 ,0) doesn't effect 
>anything.
((Good questions Matt!!))
	Well, yes and no.... The CD command effected the task that was
started up by the execute command, not your "parrent" task.  Use the
CurrentDir(lock) DOS function call to do this.

>	Which comes to my next question: Even when I use Execute() with 
>a fully specified path, it still seems to try to follow c:  ??? 

	The DOS execute call REQUIRES the RUN command.  More 
specifically it requires "c:run" therefore the constant reference to
C:

			--Bruce Barrett