-1

我在编写批处理脚本方面真的很新,但我试图在多个文件中找到所有出现的字符串,并使用 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.

有没有办法避免覆盖?

谢谢!!

4

1 回答 1

0

>重新创建一个文件。

>>附加到现有文件,如果它不存在则创建它。

于 2013-04-12T05:09:43.327 回答