我在编写批处理脚本方面真的很新,但我试图在多个文件中找到所有出现的字符串,并使用 for 循环将这些字符串写入 txt 文件。这是我所拥有的:
for %%i in (a.log b.log c.log) do
(
find /I "error" %%i > check.txt
)
但不知何故,check.txt only contains the strings from c.log and not from the previous two, probably overwrote
.
有没有办法避免覆盖?
谢谢!!