为什么这个错误?系统无法在Application的消息文件中找到消息号0x2331的消息文本

时间:2012-11-20 06:26:25

标签: perl cmd

系统无法在Application的消息文件中找到消息号0x2331的消息文本。我尝试使用'system(“ren ref.txt ref1.txt”)在perl程序中重命名该文件;'虽然我之前关闭了ref.txt的文件处理程序

1 个答案:

答案 0 :(得分:2)

参考:http://www.febooti.com/products/automation-workshop/online-help/events/run-dos-cmd-command/exit-codes/

0x2331表示Program is not recognized as an internal or external command, operable program or batch file.

ren是一个命令行函数,而不是一个独立的程序。尝试

system("cmd /k ren ref.txt ref1.txt");

而不是

system("ren ref.txt ref1.txt");