-
Batch Script Command
I'm trying to use batch to set an environment variable
I use the command prompt a lot sometimes, and cygwin often, but often just the command prompt, so I am wondering how I might perform this task: add the current directory into the PATH environment variables
In cygwin/bash, I can say
PATH=$PATH;$($echo pwd) or something
But in cmd I don't know what to do. I know that 'cd' can perform like 'pwd' but is there anyway I can do this using the 'set' command?
-
A batch script like this would work:
--
Mats
-
I stumbled through a lot of old dos websites before i discovered %cd% -- %1 isparameter and %0 is the program's name. I also downloaded the SP2 additional program for admins and it includes setx.exe for more control over environmental variables. More than set.exe at least. Your suggestion did lead me into this info, thanks matsp
path=%path%;%cd%