Welcome to AspAdvice Sign in | Join | Help

ASP.NET - Copy file to another folder

foreach (string item in Directory.GetFiles(Server.MapPath("~/PdfFolder/"), "*.*"))
{

File.Copy(item, Server.MapPath("~/Destination/") + Path.GetFileName(item), true);
File.Delete(item);

}

Published Monday, May 11, 2009 10:50 AM by mo meng

Comment Notification

If you would like to receive an email when updates are made to this post, please register here

Subscribe to this post's comments using RSS

Comments

No Comments

Leave a Comment

(required) 
required 
(required) 
Enter the code you see below