我想制作一个bat文件,它只能复制最高编号的文件。 文件就像
xxxx,0.xml xxxx,1.xml xxxx,2.xml.
我只想要xxxx,2.xml。 在这个文件夹中有更多的文件。
非常感谢您的帮助
按名称排序文件(排除目录):
dir /b /ad /on "xxxx,*.xml"
得到最后一个:
for "tokens=*"/f %%i in ('dir /b /ad /on "xxx,*.xml"') do set last=%%i echo %last%