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

问题描述:

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

Im trying to rewrite multiple files in folder using CMD in windows 7. Im using this code:

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

如果我在路径中的某处有空格,则代码不起作用.知道如何修复它吗?

If i have a space somewhere in the path, the code is not working. Any idea how to fix it?

谢谢

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

Any argument that contains spaces (not only paths) should be surrounded by double quotes.

这适用于所有操作系统.

This is true for all operating systems.

在你的情况下:

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