The syntax of my rename command is incorrect

时间:2018-01-25 16:19:10

标签: cmd rename command-prompt

When trying to rename a file in a command prompt, I am getting the error:

The syntax of the command is incorrect.

Here's my command:

rename "%userprofile%\AppData\LocalLow\Sun\Java\Deployment\security\trusted.certs" "%userprofile%\AppData\LocalLow\Sun\Java\Deployment\security\trusted.certs.old"

1 个答案:

答案 0 :(得分:2)

rename不支持目标路径(只是新文件名):

rename "%userprofile%\AppData\LocalLow\Sun\Java\Deployment\security\trusted.certs" "trusted.certs.old"