Tuesday, August 17, 2010

Script to add current folder to path variable

Adding directories to path variable is huge pain, just navigate to the directory you want to add to path variable and run this script

setx -m PATH "%PATH%;%CD%"
set PATH="%PATH%;%CD%"

You might want to save the above code snippet to a file and name it something like addtopath.bat

Once you have created the above file, obviosuly you should add its directory to path variable too maybe using the same script to save a few seconds