如何在命令提示符中使用空格? [英] How do I use spaces in the Command Prompt?

查看:266
本文介绍了如何在命令提示符中使用空格?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何在Windows命令行中使用空格?

How can I use spaces in the Windows Command Line?

cmd /C C:\Program Files (x86)\WinRar\Rar.exe a D:\Hello 2\File.rar D:\Hello 2\*.*


推荐答案

在这种情况下,单引号不会起作用。您必须在每个路径周围加上引号,并将整个命令括在引号中:

Single quotation marks won't do in that case. You have to add quotation marks around each path and also enclose the whole command in quotation marks:

cmd /C ""C:\Program Files (x86)\WinRar\Rar.exe" a "D:\Hello 2\File.rar" "D:\Hello 2\*.*""

这篇关于如何在命令提示符中使用空格?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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