批处理文件读取并存储在文本文件字符串中

batch file read and store in a text file string

所以我有多个文件,打开后看起来像这样

 THis is header
 A|0003920449219349||||B|skej24ie422|
 F|ddawejaskld

我的问题是如何将第二行中的字符串特别是 0003920449219349(或 | 之间的数字)存储到单独的文本文件 (>storehere.txt)

for /f "tokens=2,3 delims=|" %%a in (*.txt) do if "%%b" neq "" echo %%a>>storehere.txt

...假设格式确实是您的示例。