CMD - 如何处理路径中的空格 [英] CMD - How to deal with spaces in path

查看:30
本文介绍了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"

这篇关于CMD - 如何处理路径中的空格的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆