Wednesday, 24 April 2013

copy a file into another folder in asp .net

string targetFolder = Server.MapPath(“~/PDF”);
System.IO.FileInfo fi = new System.IO.FileInfo(Server.MapPath(“~/Bookmark.pdf”));
fi.CopyTo(System.IO.Path.Combine(targetFolder, fi.Name), true);