【文件属性】:
文件名称:C#拷贝整个文件夹及子目录和其中文件的方法
文件大小:36KB
文件格式:PDF
更新时间:2020-12-31 00:24:59
directory string 拷贝
下面一段代码给大家介绍C#拷贝整个文件夹以及子目录和其中文件,具体代码如下所示:
private void CopyDirectory( string srcPath, string desPath)
{
string folderName = srcdir.Substring(srcdir.LastIndexOf( \\ )+1);
string desfolderdir = desPath + \\ + folderName;
if (desdir.LastIndexOf( \\ ) == (desPath.Length - 1))
{