[comp.sys.ibm.pc] HELP with subst in an autoexec.bat

mds7958@ritcv.UUCP (04/07/87)

I am having a problem with using subst in a batch file.
I want to make a directory (c:\disk.e) accessible simply by using a drive name
(e:).

The problem is that when I start up my system, and the commands in the
autoexec.bat file are executed, I get the following error.

the autoexec.bat file
+-----------------------------------------------------------------------------
| echo off
| prompt $e[31;1m$d  $e[32m$t$h$h$h$_$e[33m$p $g $e[0m
| path c:\dos;c:\batches
| dir c:\dos\lastused > c:\dos\lastlog
| type c:\dos\lastused > c:\dos\lastused
| c:\dos\subst e: c:\disk.e

the error message
+-----------------------------------------------------------------------------
| C>
| C> echo off
| Cannot SUBST a network drive

When I re-execute the autoexec.bat file manually, it makes the substitution
without difficulty.

Does anybody know why this happens and how to make it work correctly?
I am using a Leading Edge Model D with 512K, one floppy (a:), a 30 megabyte
hard disk (c:), and MS-DOS 3.1.  Any suggestions would be much appreciated.

                          Thanks,

                          Mark Sicignano
                          {allegra,seismo}!rochester!ritcv!mds7958

jvc@mirror.UUCP (04/07/87)

>/* Written  5:47 pm  Apr  6, 1987 by mds7958@ritcv.UUCP in mirror:comp.sys.ibm.pc */
>/* ---------- "HELP with subst in an autoexec.bat" ---------- */
>I am having a problem with using subst in a batch file.
>I want to make a directory (c:\disk.e) accessible simply by using a drive name
>(e:).
>
>
>The problem is that when I start up my system, and the commands in the
>autoexec.bat file are executed, I get the following error.
>
>the autoexec.bat file
>+-----------------------------------------------------------------------------
>| echo off
>| prompt $e[31;1m$d  $e[32m$t$h$h$h$_$e[33m$p $g $e[0m
>| path c:\dos;c:\batches
>| dir c:\dos\lastused > c:\dos\lastlog
>| type c:\dos\lastused > c:\dos\lastused
>| c:\dos\subst e: c:\disk.e
>
>the error message
>+-----------------------------------------------------------------------------
>| C>
>| C> echo off
>| Cannot SUBST a network drive
>
>When I re-execute the autoexec.bat file manually, it makes the substitution
>without difficulty.
>
>Does anybody know why this happens and how to make it work correctly?
>I am using a Leading Edge Model D with 512K, one floppy (a:), a 30 megabyte
>hard disk (c:), and MS-DOS 3.1.  Any suggestions would be much appreciated.
>
>                          Thanks,
>
>                          Mark Sicignano
>                          {allegra,seismo}!rochester!ritcv!mds7958
>/* End of text from mirror:comp.sys.ibm.pc */

I'm using a IBM XT with a 640k, one floppy and a 10 megabyte hardisk,
PC-DOS 3.1.  I can't reproduce the problem.

Try using a directory name with only alphanumeric characters.


-------------------------------------------------------------------------
Jim Champeaux	jvc@mirror.TMC.COM
		{mit-eddie, ihnp4, wjh12, cca, cbosgd, seismo}!mirror!jvc
Mirror Systems,	2067 Massachusetts Avenue, Cambridge, MA 02140
Telephone:	(617) 661-0777