CODE: [Copy to clipboard]
@echo off
For /f "skip=1 tokens=1,2,3,4,5*" %%a In (更新.txt) Do (
if "%%c" == "%date:~0,4%%date:~5,2%%date:~8,2%" echo %%a %%b %%c %%d %%e >>更新2.txt
)
但这会过滤掉CODE: [Copy to clipboard]
@echo off&&setlocal enabledelayedexpansion
del C:\今天更新.txt /f /q>nul 2>nul
set han=%date:~0,4%%date:~5,2%%date:~8,2%
For /f "skip=1 tokens=1,2,3,4,5* delims=," %%a in (A.txt) do (
set ye=%%a %%b
For /f "tokens=1,2,3,4,5,6* delims=- " %%i in ("%%c %%d") do (
set str1=0%%j
set str2=0%%k
set xing=%%l %%m
set gu=%%i!str1:~-2!!str2:~-2!
)
if "!gu!" == "!han!" echo !ye! !gu! !xing! >>C:\今天更新.txt
)
pause
你看一下。。。CODE: [Copy to clipboard]
@echo off&&setlocal enabledelayedexpansion
del C:\今天更新.txt /f /q>nul 2>nul
set han=%date:~0,4%%date:~5,2%%date:~8,2%
For /f "skip=1 tokens=1-3 delims=," %%a in (A.txt) do (
set gu=%%a
set ye=%%b
For /f "tokens=1-3 delims=- " %%i in ("%%c") do (
set str1=0%%j
set str2=0%%k
set xing=%%i!str1:~-2!!str2:~-2!
)
if "!gu!" == "成功" if "!xing!" == "!han!" echo !ye!>>C:\今天更新.txt
)
pause