Possible Duplicate:
How to copy a file to another path?
hi,
how to copy war files from one folder to another using c#.
Give this a try...
DirectoryInfo sourceDirectory = new DirectoryInfo("mySource");
FileInfo[] warFiles = sourceDirectory.GetFiles("*.war");
foreach(FileInfo file in warFiles)
{
file.CopyTo("myDestination");
}
Quick and Easy System.IO.File.Copy(sourceFileName, destination)
精彩评论