C#,如何遍历所有驱动器和文件夹以复制图像并将它们粘贴到特定文件夹中?

C#, How to Traverse all drive and folder to copy image and paste them in a specific folder?

我的项目是一个使用 asp.net 的图库。 最初当项目第一次加载时,我需要复制计算机中的所有图像并将它们粘贴到名为 Data 的文件夹中。

这是我的项目link: https://www.dropbox.com/s/sr3qhaamiiwk0di/Gallary_temp.zip?dl=0 https://drive.google.com/file/d/0BynGaI0gi3mrOEtweWlWOEdmSFE/view?usp=sharing

当然,代码必须是c#

与其每次都将图像从硬盘驱动器复制到您的位置,不如将文件位置保存在数据库中并在需要时调用它们。