这个论坛上 还真是多的 稍搜即有- @echo off&setlocal enabledelayedexpansion
- for /f "tokens=*" %%i in (t.txt) do (
- set ymd=%%i
- set /a "m=(1!ymd:~4,2!+5)%%12+4,y=!ymd:~,4!-m/14,d=1461*y/4+153*m/5+1!ymd:~-2!-100"
- )
- for /f "skip=1 tokens=1-3" %%i in ('wmic path Win32_LocalTime get Month^,Day^,Year') do (
- set /a "m=(%%j+9)%%12+4,y=%%k-m/14,d-=1461*y/4+153*m/5+%%i"
- )
- if !d! lss 30 (bak1.bat) else if !d! lss 0 del1.bat
- echo !D!
- pause>nul
复制代码
|