markie
June 11th, 2004, 06:49 PM
Here's something I need to do in an NT shell command which is very simple in unix. I want to set a variable with the result of another command. On unix, I can say "curdir=`pwd`" and the value of curdir will be set to the result of the pwd (print working directory) command. In Windows shell scripting this appears to be impossible! Can someone suggest a workaround?
bobo
June 11th, 2004, 08:42 PM
should find your answer here
http://www.microsoft.com/technet/prodtechnol/winntas/deploy/prodspecs/shellscr.mspx
something like this?
The current prompt text is stored in the PROMPT environment variable. Changing the prompt changes the value of this variable and vice versa. Thus, these two commands have the same effect:
1. C:\>prompt [$p]
2. C:\>set PROMPT=[$p]
this as been quoted from that site