Path: utzoo!utgpu!news-server.csri.toronto.edu!helios.physics.utoronto.ca!ists!yunexus!xrtll!silver From: silver@xrtll.uucp (Hi Ho Silver) Newsgroups: comp.os.msdos.misc Subject: Re: Multiple 'path' line in autoexec.bat Message-ID: <1990Nov11.002052.7148@xrtll.uucp> Date: 11 Nov 90 00:20:52 GMT References: <1990Nov9.191001.15360@mcs.anl.gov> Reply-To: silver@xrtll.UUCP (Hi Ho Silver) Organization: Not around here, pal! Lines: 43 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