本帖最后由 smss 于 2020-5-23 02:13 编辑
- @echo off&setlocal enabledelayedexpansion
- if "%1"=="" echo 拖拽目标文件夹至此批处理即可&ping 0 -n "3">nul&exit
- if %time:~0,2% lss 10 (set time=!time:~1,1!!time:~3,2!!time:~6,2!) else set time=%time:~0,2%%time:~3,2%%time:~6,2%
- for /f "delims=" %%a in ('dir /o-d/b "%1\*"') do (set "n=%%~na"
- if "!n:~0,1!" neq "." echo 最新文件:"%%a"时间:"%%~ta"© "%%~fa" "%~dp0!date:~0,4!!date:~5,2!!date:~8,2!!time!%%~xa"&pause&exit)
复制代码
|