Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

What does the % do in %PATH%?

I’m looking inside Jenkins job as part of the series of build commands:

PATH=c:\cygwin\bin\%PATH%;

I’m sure of what is happening to %PATH% in this context and I have not observed a variable surrounded by %. What is it called and what does it do?

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

>Solution :

%PATH% is called a Placeholder, where the surrounding system, weather that is Windows, or Jenkins or any other system expects such "wrapped with % words" to be later REPLACED by some value, which can be used in scripting, within OS Environments (in your case Windows Environments)

In Windows the %PATH% is usually something like:

%SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem

which further expands to other paths, where the system expects specific applications or libraries/DLLs to be found.

Keep in mind that as you install programs, the path is updated with the paths for the newly installed programs. So, if you have erased your path after installing other programs, those programs may be affected.

Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading