On windows/cygwin, i want to be able save the PATH variable to file on one machine and load it onto the other machine;
for storing the variable i am doing:
echo %PATH% > dat
however, not sure how to load it later.
set PATH=???????
Thanks Rami
Just use: set /P PATH=< dat
You must note that echo %PATH% > dat
insert an additional space after %PATH% value; that space may cause problems if an additional path is later added to PATH variable. Just eliminate the extra space this way: echo %PATH%> dat
.