FileInfo.copy () cannot copy the content of the entire folder. If you need to copy the content of the entire folder, you need to copy each file separately, and build the same folder name of the old directory! ~ Khan ~~ This troubles ~ By checking EXISTS, you can determine if the file exists! /// /// copy all files of the specified directory, does not include subdirectories /// summary> /// Original directory param> /// Target directory param> /// If true, it means that the same name file is overwritten, otherwise it is not overwriting param> public static Void CopyFiles (String SourceDir, String Targetdir, Bool Overwrite) {CopyFiles (SourceDir, Targetdir, Overwrite, False);} /// /// copy specified directory //// summary> ///// Original directory param> /// target directory param> /// If true, override the same name file, Otherwise, it is not overwritten param> /// If true, contains the directory, otherwise it does not include param> public static void CopyFiles (String Sourcedir, String Targetdir, Bool Overwrite, Bool CopyDir) { string [] fileEntries = Directory.GetFiles (sourceDir); if (overWrite) {foreach (string fileName in fileEntries) {File.Copy (fileName, targetDir fileName.Substring (fileName.LastIndexOf ( "//")), true) ; //Console.writeline (FileName "-> " targetdir FileName.Substring (FileName.lastIndexOf ("//")));}}} else {foreach (String FileName In FileEntries) {if (! File.exists) Targetdir filename.substring (filename.lastIndexof ("//")))) {file.copy (filename, targetdir filename.substring ("//"))); ///console.writeline (FileName "->" Targetdir filename.substring (filename.lastindexof ("//")))))