@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/