@echo off & setlocal enabledelayedexpansionset "fileA=a.txt"set "fileB=b.txt"for %%i in ("%fileA%" "%fileB%") do ( set /a num+=1 set "data!num!=%%~ti")if "%data1%" gtr "%data2%" (copy /y "!fileA!" "!fileB!") else (echo 不替换)pause