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
  • 501
  • 4
  • 8
  • 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
  • 47,582
  • 15
  • 104
  • 136
0

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

TrustyCoder
  • 4,580
  • 8
  • 62
  • 113