Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我有 100 个文件,需要在每个文件的末尾附加一行。
有没有办法用记事本++做到这一点?
Lickro 的答案很棒,可以与 Notepad++ 一起使用。
这是设置的屏幕截图:
我正在添加一个换行符\n,然后是文本。
\n
你可以搜索
(.*)
并替换为
"\1"
激活多行正则表达式选项。在这种情况下, (.*) 匹配文件中的整个文本,并且由于括号中的您可以使用 \1 访问匹配项并在其后附加一些内容。
建议你使用批处理文件
FOR %%G IN (*) DO echo "myline" >> %%G "C:\myDir"
应该将 myline 附加到 myDir 中的所有文件