0

Possible Duplicate:
How to copy a file to another path?

hi,

how to copy war files from one folder to another using c#.

Community
  • 1
  • 1
rajshades
  • 511
  • 4
  • 9
  • 21

2 Answers2

1

Give this a try...

DirectoryInfo sourceDirectory = new DirectoryInfo("mySource");
FileInfo[] warFiles = sourceDirectory.GetFiles("*.war");

foreach(FileInfo file in warFiles)
{
    file.CopyTo("myDestination");
}
Austin Salonen
  • 49,173
  • 15
  • 109
  • 139
0

Quick and Easy System.IO.File.Copy(sourceFileName, destination)

TrustyCoder
  • 4,749
  • 10
  • 66
  • 119