批处理脚本:查找文件夹名中最大数字并创建新文件
@echo off setlocal enabledelayedexpansion set /'max=0/' for /d %%d in (*) do ( for /f /'tokens=2 delims=/' %%n in (/'%%~nd/') do ( set /a /'num=%%n/' if !num! gtr !max! set /'max=!num!/' ) ) echo Max number: %max% rem 创建新的文本文件 copy NUL /'xx%max%.txt/
AI 优化版
原文地址:https://www.cveoy.top/t/topic/qbk6 著作权归作者所有。请勿转载和采集!