Thursday, November 22, 2012

Batch Tip: Extend path with the current directory.


To extend the path by a directory I usually take several tries as I incorrectly type the new path line, or merge copy and paste lines.  Today I discovered a simple alternative, cd to the directory and use the %PWD% special environment variables, e.g: 




cd directory\Of\Interest
set PATH=%PATH%;"%CD"


No comments:

Post a Comment