我从网上找的例子:
@echo off
echo this is %%cd%% %cd%
echo this is %%~dp0 %~dp0
echo this is %path%
运行结果是
this is %cd%
this is %~dp0 ~dp0
this is D:\ProgramData\oracle\oracle10g\bin;......................
~dp0和%cd%一点反应也没有啊
然后我又试试
@echo off
echo this is %%cd%% %cd% "%cd%"
echo this is %%~dp0 %~dp0 "%~dp0"
echo this is %path%
运行结果是
this is %cd% ""
this is %~dp0 ~dp0"
this is D:\ProgramData\oracle\oracle10g\bin........
请问这是怎么回事啊,我哪儿出错了吗
@echo off
echo this is %%cd%% %cd%
echo this is %%~dp0 %~dp0
echo this is %path%
运行结果是
this is %cd%
this is %~dp0 ~dp0
this is D:\ProgramData\oracle\oracle10g\bin;......................
~dp0和%cd%一点反应也没有啊
然后我又试试
@echo off
echo this is %%cd%% %cd% "%cd%"
echo this is %%~dp0 %~dp0 "%~dp0"
echo this is %path%
运行结果是
this is %cd% ""
this is %~dp0 ~dp0"
this is D:\ProgramData\oracle\oracle10g\bin........
请问这是怎么回事啊,我哪儿出错了吗