Originally posted by namejm at 2006-8-18 07:37:
请问的的系统版本?
我的是WinXP+SP2,输入pwd命令之后,提示说既不是内、外命令,也不是可执行程序或者批处理。
向 namejm 兄道歉,是我搞错了,俺的 Win32 上装了 posix shell 环境,所以经常不自觉的在用 unix 命令,还以为 Win32 也自带了,呵呵。
不过偶一楼的本意是说将任意命令的标准输出赋值给一个环境变量。pwd 在这里只是据个例子 <img src="images/smilies/face-raspberry.png" align="absmiddle" border="0">,如果仅仅要完成 pwd 到变量的效果,for %%I in (.) do set PWD=%%~fnI 就足以了。<img src="images/smilies/face-wink.png" align="absmiddle" border="0">
Originally posted by namejm at 2006-8-18 07:37:
What is the version of your system?
Mine is WinXP + SP2. After entering the pwd command, it prompts that it is neither an internal or external command, nor an executable program or batch file.
Apologize to Brother namejm, I made a mistake. I installed the posix shell environment on my Win32, so I often unconsciously use unix commands and thought Win32 also came with it, heh heh.
But the original intention of my first floor is to say that assign the standard output of any command to an environment variable. pwd is just an example here :P. If you just want to complete the effect of pwd to the variable, for %%I in (.) do set PWD=%%~fnI is enough. ;)