gpt4 book ai didi

batch-file - 如何防止来自del * .txt的 “Could Not Find”错误消息?

转载 作者:行者123 更新时间:2023-12-03 10:08:41 26 4
gpt4 key购买 nike

在Windows批处理文件中,此行:

del *.txt

将给出错误/警告消息:
Could Not Find C:\*.txt

如果没有文件与* .txt模式匹配。有没有办法防止该消息?

最佳答案

if exist *.txt del *.txt

关于batch-file - 如何防止来自del * .txt的 “Could Not Find”错误消息?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/1177348/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com