我需要一个代码来检测是否有两个具有相同扩展名的文件,并且我需要它来执行不同的代码。
检测文件夹是否是我需要的两个 *.txt 文件
echo 此文件夹中有两个文本文件 请删除一个并继续
但是,如果只有一个文本文件,请保持代码运行
我目前正在使用此代码来检测文件夹中是否没有任何文件
If not exist Files\*.txt echo there is no lyrics
也许如果我们也可以将其结合起来,例如
if text file equal to 0 echo no lyrics
if text file equal to 1 echo.
if text file Gtr 1 ech there is more than on text file in the folder
该代码将被使用两次,一次用于文本文件,另一次用于 .ogg 音频文件
谢谢