在C#.Net中合并束文件 [英] Merge Bunch File in C#.Net

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

问题描述


我正在C#.Net项目中工作.我在一个特定的文件夹中有一堆文件.我想合并到一个文件中,然后我移到另一个文件夹.在这里我举一个例子
例如:
源文件夹名称:Source
源文件:Nan.txt,Nan1.txt,Nan2.txt.
名称文件夹名称:名称
指定文件:CNan.txt
如何实现?请帮助我...
感谢进阶
问候,
Lakshmi Narayanan.S

Hi ,
I am working in C#.Net Project.I have bunch of files in a Particular folder.I want to merge in Single file and I move to another folder.Here i give an Example
For Example:
Source Folder Name: Source
Source Files : Nan.txt,Nan1.txt,Nan2.txt.
Designation Folder Name :Designation
Designation File: CNan.txt
How to achieve this?Please help me...
Thanks in Advanced
Regards,
Lakshmi Narayanan.S

推荐答案

我不知道您所说的合并"是什么意思,但是如果您只想将文件一个接一个地附加到单个文件中文件,您可以在要存储的任何地方打开输出文件流,然后按照所需顺序将每个输入文件复制到该文件中.
I''m not sure what you mean by "merge," but if you just want to append the files one after another into the single file, you could open an output file stream wherever you want to store it and copy each of the input files to it in whatever order you want.


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

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