简体   繁体   中英

Transfer files in using c#

如何使用c#将文件从文件夹复制到另一个文件夹?

The System.IO.File, System.IO.Directory, System.IO.FileInfo classes "Mr.Expert" suggested above are fine for copying and deleting individual files.

But if you are deleting/copying large number of files you are probably better off using an alternative method see this question I asked previous..

Delete a large number (>100K) of files with c# whilst maintaining performance in a web application?

The System.IO.Directory.GetFiles can cause a performance issue when dealing with large number of files.

System.IO.File.Copy

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM