在目录中写入文件 [英] write files in directory
本文介绍了在目录中写入文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
HI ALL
在我的代码中,我从c#中的目录获取文件.在特定目录中存在大量文件.然后我一步一步地对该文件进行一些处理,现在我想将这些输出文件写入单独的目录中.
我将createDirectory方法用于此目录中的输出文件
但是如何在输出目录中写入这些输出文件.
否则默认情况下将文件写入输入文件夹
plz帮助如何逐步将文件写入输出目录中的所有文件
关于
HI ALL
in my code i get files from a directory in c# . loots of files there in the specific directory .then i do some processing on that files step by step now i want to write these output file in seperate directory .
i use createDirectory method for out put files wite in this directory
but how to write these output files in ouput directory .
else by default files written in the input folder
plz help how to write files in the output directory step by step all files
Regards
推荐答案
要写入文件,可以使用File
: ^ ]
To write files you can use File
: http://msdn.microsoft.com/en-us/library/system.io.file.aspx[^]
我建议使用 File.Copy .
或者如果您要剪切特定的文件夹&过去要输出文件夹,请使用文件.移动
I suggest use File.Copy.
or if you want to cut from specific folder & past to output folder use File.Move
这篇关于在目录中写入文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文