CMD - How to deal with spaces in path

2019-09-05 00:31发布

问题:

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?

Thanks

回答1:

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

This is true for all operating systems.

in your case:

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


标签: windows cmd