需要在目录中合并大量文件 [英] Need to combine lots of files in a directory

查看:66
本文介绍了需要在目录中合并大量文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的目录中有50到60个文件,我需要定期将它们串联成一个文件。



我考虑过使用记事本++,认为可能有一个插件可以帮上忙,但一直找不到。



还有其他想法吗?

解决方案

假设这些是文本文件(因为您使用的是notepad ++),并且您在Windows上,您可以使用简单的批处理脚本将它们串联在一起。



例如,在包含所有文本文件的目录中,执行以下操作:

(* .txt)中%f的

 ,请键入%f>> Combine.txt 

这会将所有与* .txt匹配的文件合并为一个名为Combined.txt的文件。 / p>

有关更多信息:



http://www.howtogeek.com/howto/keyboard-ninja/keyboard-ninja-concatenate-multiple -text-files-in-windows /


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:

http://www.howtogeek.com/howto/keyboard-ninja/keyboard-ninja-concatenate-multiple-text-files-in-windows/

这篇关于需要在目录中合并大量文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆