开发者

how to copy war file progrmaticaly using c# [duplicate]

开发者 https://www.devze.com 2023-01-05 08:49 出处:网络
This question already has answer开发者_JAVA百科s here: Closed 12 years ago. Possible Duplicate: How to copy a file to another path?
This question already has answer开发者_JAVA百科s here: Closed 12 years ago.

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)

0

精彩评论

暂无评论...
验证码 换一张
取 消