On Sun, Nov 3, 2013 at 10:38 AM, Miguel Garza <garz...@gmail.com> wrote:
> I've got my programs in subdirectories of C:\APPS, and whenever I add a new
> program, I have to add its path to autoexec.bat like so:
>
> set PATH=.;c:\;\LOCALE;\APPS;[all the other paths to the other programs in
> the APPS folder];\APPS\NEWPROG
>
> But now FDOS is telling me my PATH is too long and PATH isn't working. So I
> took some of the paths off the end that I just added, and now PATH is
> parsed. But is there any way I can have more paths in my PATH?

You're running into a DOS limit on the length of an environment string.

I assume \APPS is the top level directory, and each program is
installed in a sub-directory  of it.  Every time you add a new
program, you add another directory to your path.

One question is whether they all *need* to be in separate directories?
  Most of the stuff
I have in FreeDOS does not need to be: the programs are EXE files that
can all be in a \DOS (or whatever) directory.  I  just have \DOS in my
PATH for all of them.

If an application is more complex and needs it's own directory, don't
put it in the PATH.  That's what batch files are for.  I have a \BATCH
directory in my PATH where batch files live.

To run one of those programs, I do it through a batch file, like

@echo off
:: foobar.bat - run foobar application under FDOS
c:
set FOOBARHOME=c:\opt\foobar
cd \opt\foobar
foobar %1
exit

Because \BATCH is in my PATH, when I type "foobar test" on the command
line, DOS will find and run foobar.bat and pass it "test" as a
parameter.

DOS looks in what it thinks is the current directory first when you
pass it a program name on the command line, so the batch file changes
to the proper directory and runs the program. The batch file can also
do other things the program might need, like defining environment
variables and passing parameters on the command line.
______
Dennis

------------------------------------------------------------------------------
Android is increasing in popularity, but the open development platform that
developers love is also attractive to malware creators. Download this white
paper to learn more about secure code signing practices that can help keep
Android apps secure.
http://pubads.g.doubleclick.net/gampad/clk?id=65839951&iu=/4140/ostg.clktrk
_______________________________________________
Freedos-user mailing list
Freedos-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/freedos-user

Reply via email to