B
BigMan
How should I check if a path is in the PATH environment variable?
How should I check if a path is in the PATH environment variable?
To first check and then append a path given as argument.BigMan said:How should I check if a path is in the PATH environment variable?
Matthias Tacke said:To first check and then append a path given as argument.
::Add2Path.bat:::::::::::::::::::::::::::::::::::::::::::::::::::::::::
@echo off
echo.%path%|find /C /I "%1">NUL
if errorlevel 1 set Path=%Path%;%1
::Add2Path.bat:::::::::::::::::::::::::::::::::::::::::::::::::::::::::
I think this does not work...For %! In (%PATH%) Do If "%!" == "%1" Set ...
BigMan said:I think this does not work...
commandline:BigMan said:OK, please give the source of a bat file that writes every path in PATH to
the screen...
The standard for has the space "," and the ";" as standard delmiters.BigMan said:Wow!
Could you explain this: "%path:;=";"%"
BigMan said:How should I check if a path is in the PATH environment variable?
BigMan said:OK, please give the source of a bat file that writes every path in PATH to
the screen...