public class copyDirectoryDemo { public static void main(String[] args) { File srcFolder = new File("C:\\Users\\MA\\Desktop\\IOtest"); File destFolder = new File("C:\\Users\\MA\\Desktop\\IOtest\\test"); fun(srcFolder, destFolder); } pu
1.复制文件夹 public static void copyDir(String oldPath, String newPath) throws IOException { File file = new File(oldPath); //文件名称列表 String[] filePath = file.list(); if (!(new File(newPath)).exists()) { (new File(newPath)).mkdir(); } for (int i = 0; i < f
using System; using System.Collections.Generic; using System.Text; namespace ClientPrintServer.Tools { public class CopyFilesKit { /// <summary> /// 拷贝文件夹到指定文件夹并更改文件夹名称 /// </summary> /// <param name="srcPath">源文件夹</param>