Back to home page

DOS ain't dead

Forum index page

Log in | Register

Back to the forum
Board view  Mix view

How 2 add directory to PATH from command line (Users)

posted by marcov, 07.01.2013, 18:22

That's code similar to what I use, I use the following code (cmd.exe though, don't know how portable NEQ is to Dos) to switch between multiple versions of toolchains.

if "%OLDPATH%" neq "" goto :nosave
set OLDPATH=%PATH%
:nosave
SET PATH=%OLDPATH%
PATH d:\pp26\bin\i386-win32;%PATH%

the main reason is that the various compilers/ides (BP,Delphi, cygwin and fpc verions) all bring at least their own "make", and some of them also have own copies of other binaries(as,ld etc).

This makes it always possible to "undo" changes to the path by setting PATH to OLDPATH.

P.s. I know that the last two lines can be combined, but my old generator doesn't do it

 

Complete thread:

Back to the forum
Board view  Mix view
22762 Postings in 2122 Threads, 402 registered users (1 online)
DOS ain't dead | Admin contact
RSS Feed
powered by my little forum