dos命令怎么修改计算机名称,ren(更改文件和目录的名称)_语法_示例_MSDOS命令_uc电脑园官网...

Getting "The syntax of the command is incorrect." error

In the Windows command line, when trying to copy, move, or rename a file or directory with a space you may get the "The syntax of the command is incorrect." error message. This error message is generated when the Windows command line does not understand the syntax of the command because it is not formatted properly. To resolve this issue, surround any file name or directory name with spaces in it with quotes.

For example, if we had a directory or file name called "computer hope" you would enter the following commands.

Copying a file with a space

In this first example, we're copying the file "computer hope.txt" into the hope directory. Without the quotes around the file, you get "The syntax of the command is incorrect." error message.

copy "computer hope.txt" hope

Moving a file with a space in the file name

Next, the following command would move the file "computer hope.txt" into the hope directory. Again, without quotes you get the error message.

move "computer hope.txt" hope

Renaming a file with a space in the file name

Finally, the following command would rename the same file to example file.txt, which also has a space in the file name.

rename "computer hope.txt" "example file.txt"

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值