如题所述
前期准备:假如在D盘根目录下建立一个.bat文件,再建立一个名字为"file.txt"的文本文档.然后判断D盘根目录下是否有a.mp3和b.mp3以及c.mp3这些文件.程序如下:\x0d\x0a@echo off\x0d\x0aif exist D:\a.mp3 echo a.mp3>>file.txt\x0d\x0a if not exist D:\a.mp3 echo a.mp3不存在>>file.txt\x0d\x0aif exist D:\b.mp3 echo b.mp3>>file.txt\x0d\x0a if not exist D:\b.mp3 echo b.mp3不存在>>file.txt\x0d\x0aif exist D:\c.mp3 echo c.mp3>>file.txt\x0d\x0a if not exist D:\c.mp3 echo c.mp3不存在>>file.txt
温馨提示:答案为网友推荐,仅供参考