For one CMD
session I can easily set a new path: SET PATH=%PATH%;"insert custom path here"
Doing so in a batch file does not consider whether the custom path is already included. How do I avoid duplicating it (i.e. check whether it is already contained in the PATH "string").
Remarks:
- Related: How do I append user-defined environment variables to the system variable PATH in Windows 7?
- Related: How can I permanently append an entry into the system's PATH variable, via command line?
- Same question for UNIX: Add directory to $PATH if it's not already there
- Some "CMD" String ops explained: http://ss64.com/nt/syntax-replace.html