需要在目录中合并大量文件 [英] Need to combine lots of files in a directory
问题描述
我的目录中有50到60个文件,我需要定期将它们串联成一个文件。
我考虑过使用记事本++,认为可能有一个插件可以帮上忙,但一直找不到。
还有其他想法吗?
假设这些是文本文件(因为您使用的是notepad ++),并且您在Windows上,您可以使用简单的批处理脚本将它们串联在一起。
例如,在包含所有文本文件的目录中,执行以下操作:
(* .txt)中%f的 ,请键入%f>> Combine.txt
这会将所有与* .txt匹配的文件合并为一个名为Combined.txt的文件。 / p>
有关更多信息:
I've got 50 to 60 files in a directory that I need to concatenate into a single file on a regular basis.
I thought about using notepad++ thinking there was probably a plug-in that would help but haven't been able to find one.
Any other thoughts?
Assuming these are text files (since you are using notepad++) and that you are on Windows, you could fashion a simple batch script to concatenate them together.
For example, in the directory with all the text files, execute the following:
for %f in (*.txt) do type "%f" >> combined.txt
This will merge all files matching *.txt into one file called combined.txt.
For more information:
这篇关于需要在目录中合并大量文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!