[comp.os.msdos.misc] Multiple 'path' line in autoexec.bat

park@anmsd3.msd.anl.gov (Yongsup Park) (11/10/90)

I am writing a long path statement in the Autoexec.bat file, 
it takes up more than one line. How do I continue from the first line 
to the second ?

Thanks in advance.
-------------------------------------------------------------------------------
            Yongsup Park           Internet :  park@anmsd3.msd.anl.gov
                                   BITnet   :  B40180@ANLCV1.BITNET
-------------------------------------------------------------------------------
                  Life is short: Do not resist temptation.
-------------------------------------------------------------------------------

ts@uwasa.fi (Timo Salmi) (11/10/90)

In article <1990Nov9.191001.15360@mcs.anl.gov> park@anmsd3.msd.anl.gov writes:
>I am writing a long path statement in the Autoexec.bat file, 
>it takes up more than one line. How do I continue from the first line 
>to the second ?

Use the idea in the ADDPATH batch to add directories at the end of
your path.  Addpath.bat is part of the /pc/ts/tsbat22.arc batch file
collection.  Available from uwasa.fi or Simtel20. 

 +------------------------------------------------------------+
 ! North American users please note.  Maintainer of SIMTEL20  !
 ! archives Keith Petersen has expressed a wish that you use  !
 ! one of the many archives in the USA such as SIMTEL20 and   !
 ! wuarchive.wustl.edu instead of uwasa.fi to cut down the    !
 ! load on the overseas link.  Please contact him for further !
 ! information on SIMTEL20 usage.  One of his email addresses !
 ! is w8sdz@@wsmr-simtel20.army.mil                           !
 +------------------------------------------------------------+

For the rest, the wares are available by anonymous ftp from
chyde.uwasa.fi, Vaasa, Finland, 128.214.12.3, or by using our mail
server (use the latter if, and only if you don't have anonymous
ftp).  If you are not familiar with anonymous ftp or mail servers, I
am prepared send prerecorded instructions on request.  (If you don't
get the instructions from me within a few days, it will mean that
your email address cannot be reached by a simple email reply, and
you wouldn't be able to utilize the mail server anyway.)

...................................................................
Prof. Timo Salmi        (Moderating at anon. ftp site 128.214.12.3)
School of Business Studies, University of Vaasa, SF-65101, Finland
Internet: ts@chyde.uwasa.fi Funet: gado::salmi Bitnet: salmi@finfun

fisher@sc2a.unige.ch (Markus Fischer) (11/10/90)

In article <1990Nov9.191001.15360@mcs.anl.gov>, park@anmsd3.msd.anl.gov (Yongsup Park) writes:
> I am writing a long path statement in the Autoexec.bat file, 
> it takes up more than one line. How do I continue from the first line 
> to the second ?

I assume you editor doesn't allow you to have longer lines than 80 char.  You
can have a slightly longer path with:
path=C:\bin...
path=%path%;C:\more

There is an upper limit, though (127 char, I think?).

Markus Fischer, Dpt of Anthropology, Geneva.

silver@xrtll.uucp (Hi Ho Silver) (11/11/90)

In article <1990Nov9.191001.15360@mcs.anl.gov> park@anmsd3.msd.anl.gov writes:
$I am writing a long path statement in the Autoexec.bat file, 
$it takes up more than one line. How do I continue from the first line 
$to the second ?

   If you need to add stuff onto an environment variable from within a
batch file, you can include the current contents of that variable by
enclosing its name in percent signs.  For example:

set foobar=this is a silly
set foobar=%foobar% little example

   The variable foobar will then contain "this is a silly little example".
Keep in mind, though, that because of DOS's length restriction on command
lines (<128 characters), you'll never get your path up to 120 characters,
as the length limit includes the expanded version of any %variables% (in
the above example, the length of the second line is on the order of
50 characters, not 40, because where you see %foobar%, DOS sees the
contents of that variable).

   Rather than having a huge path, however, you should determine which 
of your directories really do need to be on your path.  A large path wastes
time when searching for executables and batch files, since DOS will look
in the current directory, then in every directory in your path, until it
finds the program you asked for.  This will slow down program loads,
particularly if you're using a floppy or a slow hard drive.

   If you have any more than three or four directories in your path,
you probably have too many.  Generally, you shouldn't put applications
in your path; instead, create a directory for batch files and put that
in your path.  Put batch files to run your software in that directory.
Also, running some software from a directory other than the one it was
installed to may cause it to be unable to find some of its files.

   Like everything else, there are no hard and fast rules; some people
may have legitimate needs for an application to reside in the path, and
some people may really need long paths.  But these cases are few and far
between.
-- 
HI ROGER |Nikebo says "Nikebo knows how to post.  Just do it."| silver@xrtll
_________|-----------------------|_______________|------------|_____________
yunexus!xrtll!silver (L, not 1)  | Hi Ho Silver  | costing the net thousands
Silver:  Ever Searching for SNTF |i need a grilf | upon thousands of dollars