“在这个时候是出乎意料的."在这个、出乎意料、时候、quot

2023-09-09 21:00:18 作者:我愛上了黑夜

我在一个批处理文件上运行这个命令:

I'm running this command on a batch file:

for %I in (*.txt *.doc) do copy %I c:	est2

...它不断返回:

这个时候出乎我的意料.

I was unexpected at this time.

这个错误的原因是什么?

What is the cause of this error?

推荐答案

如果你在批处理/cmd文件中运行,你需要加倍 %标记:

If you're running within a batch/cmd file, you need to double the % markers:

for %%i in (*.txt *.doc) do copy %%i c:	est2

单个 % 变体仅适用于命令行.

The single % variant only works from the command line.