[comp.sys.novell] CD in Novell script file

cychao@csun12.cs.uh.edu (Chih-Yu Chao (Dr. S. Huang)) (04/24/91)

Hi, Can somebody tell me how to Change Directory in my script file?
DOS CD doesn't work. Thank you for your reply!

------------------------------------
CY Chao      U. of Houston, Texas
InterNet: cychao@cs.uh.edu
------------------------------------

jeffd@csd4.csd.uwm.edu (Jeffrey Alan Ding) (04/25/91)

In article <1991Apr24.132219.13101@menudo.uh.edu> cychao@csun12.UUCP (PUT YOUR NAME HERE) writes:
>Hi, Can somebody tell me how to Change Directory in my script file?
>DOS CD doesn't work. Thank you for your reply!
>
>------------------------------------
>CY Chao      U. of Houston, Texas
>InterNet: cychao@cs.uh.edu
>------------------------------------

Hi, what you can do is use the DRIVE command.  Here's an example.

     MAP H:=SYS:SYSTEM
     DRIVE H

First what you want to do is map the directory to whatever letter you
want.  In this case I mapped H to the system directory.  Then use the
DRIVE command to make the drive the default when you exit the script.
You could also use a local drive letter here.

Another way is using the external execute (#) command.  Here's an example
for that:

     MAP S1:=SYS:DOS
     MAP F:=SYS:
     SET COMSPEC = S1:COMMAND.COM
     DRIVE F
     #COMMAND /C CD \DOS

This example uses COMMAND.COM to issue the DOS CD command.  You have to have
the path for COMMAND.COM mapped as a search before you issue the call
otherwise it won't be found.

I hope I got everything right here, if not, someone will surely point it
out.  :-)   Later.

jeffd@csd4.csd.uwm.edu

maimer@kuhub.cc.ukans.edu (04/26/91)

In article <11389@uwm.edu>, jeffd@csd4.csd.uwm.edu (Jeffrey Alan Ding) writes:
> In article <1991Apr24.132219.13101@menudo.uh.edu> cychao@csun12.UUCP (PUT YOUR NAME HERE) writes:
>>Hi, Can somebody tell me how to Change Directory in my script file?
> 
> Hi, what you can do is use the DRIVE command.  Here's an example.
>                      ...
> 
> Another way is using the external execute (#) command.  Here's an example
>                      ... 
> 
We use an external command called CHNGDIR.EXE that is on the server.
I'm pretty sure it is public domain, since we have tight financial
restraints here.  This has the advantage over the #command ... since
the command.com isn't in the same place on everybody's machine (may be
at c:\, c:\bin\, c:\dos\, a:\, etc.).
-- 
           |\   \\\\__       Tony Maimer                __
           | \_/    o \                                /  |
            > _   (( <_                               /   |
           | / \__+___/  maimer@kuhub.cc.ukans.edu   /o   /_/|
           |/     |/                                <  ))  _ <
                                                    \     \ \|
                                                     \    |
       +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++