批量处理文件

for /f %i in ('dir /a-d /b /s /ON kmesglog_*.tar') do (winrar E %i)
for /f %i in ('dir /a-d /b /s /ON kmesglog_*.tar') do (del /Q %i)
for /f %i in ('dir /a-d /b /s /ON kmesglog_*') do (type %i >> big_kmesglog.txt)

for /f %i in ('dir /a-d /b /s /ON syslog_*.tar') do (winrar E %i)
for /f %i in ('dir /a-d /b /s /ON syslog_*.tar') do (del /Q %i)
for /f %i in ('dir /a-d /b /s /ON syslog_*') do (type %i >> big_syslog.txt)

find /N /I "fail" big_kmesglog.txt
find /N /I "fail" big_syslog.txt

posted on 2023-08-16 14:07  huangguanyuan  阅读(19)  评论(0编辑  收藏  举报

导航