答案 0 :(得分:1)
试一试......
DirectoryInfo sourceDirectory = new DirectoryInfo("mySource");
FileInfo[] warFiles = sourceDirectory.GetFiles("*.war");
foreach(FileInfo file in warFiles)
{
file.CopyTo("myDestination");
}
答案 1 :(得分:0)
快速而简单 System.IO.File.Copy(sourceFileName,destination)