CMD - 如何处理路径中的空格

时间:2014-11-20 08:34:27

标签: windows cmd

我试图在Windows 7中使用CMD重写文件夹中的多个文件。我使用此代码:

Replace C:\test\cisty_test_kabel  ploche.xlsm  C:\Káble /s

如果我在路径中的某处有空格,则代码无效。知道怎么解决吗?

由于

1 个答案:

答案 0 :(得分:0)

任何包含空格(不仅是路径)的参数都应该用双引号括起来。

所有操作系统都适用。

在你的情况下:

Replace "C:\test\cisty test kabel"  ploche.xlsm  C:\Káble /s "some other string"