Open fydy opened 4 years ago
dir *.*/b>目录清单.txt
test.bat
type *.txt > out.txt
@echo off (for /f "delims=" %%a in (a.txt) do ( set "str=%%a"&setlocal enabledelayedexpansion set "str=!str:*http=http!" echo;!str! endlocal ))>out.txt
a.txt 为需要提取链接所在的txt文件;out.txt为提取后链接的txt文件,命令会自动创建
a.txt
out.txt
se.bat
@echo off findstr "Serial" myfile.txt > Serial.txt findstr "packets input" myfile.txt > packets_input.txt findstr "packets output" myfile.txt > packet_output.txt
Serial,packets input,packets output分别为不同的关键词
Serial
packets input
packets output
快速批量提取文件名
批量合并txt文件
test.bat
命令:批量从txt文件中提取所有以https开头的链接
test.bat
命令:a.txt
为需要提取链接所在的txt文件;out.txt
为提取后链接的txt文件,命令会自动创建批量提取txt文本中带有某个关键字的指定行,并且提取后保存到新的txt文本中
se.bat
命令文件:Serial
,packets input
,packets output
分别为不同的关键词