【发布时间】:2016-03-17 13:11:27
【问题描述】:
所以,我想编写一行简单的代码,使批处理文件创建一个文本文档,同时回显“Achievement Get: Start the game”
if not exist "achievements\Start the Game.txt" echo Achievement Get: Start the Game! >> "achievements\Start the Game.txt"
(批处理文件已经将CD设置为文件夹位置,所以不是因为我没有完整的位置”
玩弄它,它确实会创建文件,但批处理文件从来没有说“成就获取:开始游戏!”相反,它在运行时创建的文本文件中表示。
简短版本:如果文件尚不存在,我希望批处理文件在文件夹中创建一个文本文件,但我也希望它说文件已创建。
提前致谢。
【问题讨论】:
标签: batch-file if-statement echo