- @echo off
- cd /d "%~dp0"
- set "f=d:\new"
- md "%f%" 2>nul
- for /f %%a in ('wmic os get localdatetime ^|findstr [0-9]') do (
- set today=%%a
- )
- for /f "delims=" %%i in ('dir /b /a-d *.jpg *.pdf') do (
- if "%%~ti" geq "%today:~0,4%/%today:~4,2%/%today:~6,2% 00:00" (
- copy "%%i" "%f%\%%~ni_%today:~0,4%%today:~4,2%%today:~6,2%%%~xi"
- )
- )
- pause
复制代码
|