[comp.sys.ibm.pc] Re^2: MS-DOS Path Name Length

leif@ambush.UUCP (Leif Andrew Rump) (05/02/88)

In article <2501@ihuxy.ATT.COM> vg55611@ihuxy.ATT.COM (Gopal) writes:
>Perhaps the problem can be avoided altogether by setting up one directory
>(let's say c:\bin) that contains .bat files to execute your programs
>stored in other directories.

>This a) makes the PATH short - perhaps all it may be is: c:\bin; c;\dos;
>     b) makes it shorter to find a program since all the directories in
>        the path does not have to be searched.
>     c) also provides a way to set up the environment for that particular
>        program.  For example, let us say that a program called "someprog"
>        requires an environment variable called "someenvv" to be set.  You
>        can set up this variable using the batch file, execute the program,
>        and then scrap this variable so that it does not take up any
>        environment space.

>             sp.bat =   set someenvv=whatever
 >                        c:\somedir\someprog
 >                        set someenvv=

 >'tis what I do and has worked well for me.  You probably want to add an
 >"echo off" also to the batch file.

 I'm working with a whole bunch of programmers that use hours to find
 the file they made 2 days ago! It takes me 10 seconds to find mine -
 because I'm using the same system as above - in a bit extended form -
 which I will describe now for anybody who's interrested.

 My first point is to keep my root directory as empty as possible - no
 files and only a few directories. But as you may have guessed DOS (I
 hate that system!) imposses some rules that I can't break so I end up
 with two files: AUTOEXEC.BAT and CONFIG.SYS (plus of course IBMIO and
 IBMSYS - or something simular), but that's better than page and page
 of files. My directory tree lookes something like this:

   AUTOEXEC.BAT
    CONFIG.SYS
  2 hidden files
	|
	+- TMP is deleted everytime the computer bootes
	|
	+- UTIL contains one file programs
	|
	+- APPLIC contains a lot of .BAT-files
	|     |
	|     +- PROCOMM all my PROCOMM-files
	|     |
	|     +- TP4 my Turbo Pascal 4.x directory (when I get it!)
	|     |   |
	|     |   +- SRC...
	|     |   ...
	|     |
	|     ...
	|
	+- USR empty!
	|   |
	|   +- COMPILER my homebuild testcompiler
	|   |
	|   +- MIDNIGHT my midnight program
	|   |
	|   +- FORTUNE my fortune program
	|   |
	|   ...
	|
	+- GAMES where else?
	|
	+- LC if I got it, it won't go anyother place - stupid program
	|
	...

 My CONFIG.SYS-file looks something like:
 COMSPEC=C:\DOS\COMMAND.COM /e:512 /p
 ...

 And my AUTOEXEC.BAT contains f.x.:
 set path=C:\DOS;C:\APPLIC;C:\UTIL
 set comspec=C:\DOS\COMMAND.COM
 if not exist C:\TMP\*.* goto noexist
 echo y | del C:\TMP
 :noexist
 ...

CON's: It's fast and it works - I ALLWAYS know where my files are!

PRO's: every single .BAT-file eats 2K of my harddisk space!

   Leif Andrew Rump, Ambrasoft A/S, Roejelskaer 15, DK-2840 Holte (Denmark)
       UUCP: leif@ambush.dk, phone: +45 2424 111, ABC BBS: +456800544

              "It tasted almost but not entirely unlike tea"
                    - The Hitch hicker's Guide to the Galaxy