Copying files from folder to another
-
use System.IO FileInfo Class , and File.Copy() method . Hope this hits will help you ;)
Best Regards ----------------- Abhijit Jana View My Latest Article :- SpyNet : Your Network Spy "Success is Journey it's not a destination"
-
use System.IO FileInfo Class , and File.Copy() method . Hope this hits will help you ;)
Best Regards ----------------- Abhijit Jana View My Latest Article :- SpyNet : Your Network Spy "Success is Journey it's not a destination"
-
file.copy only copies one file but i want to copy all files in a folder to another folder at a time
-
file.copy only copies one file but i want to copy all files in a folder to another folder at a time
You have got the answer :)
Best Regards ----------------- Abhijit Jana View My Latest Article :- SpyNet : Your Network Spy "Success is Journey it's not a destination"
-
You have got the answer :)
Best Regards ----------------- Abhijit Jana View My Latest Article :- SpyNet : Your Network Spy "Success is Journey it's not a destination"
-
file.copy only copies one file but i want to copy all files in a folder to another folder at a time
ysunil_74 wrote:
but i want to copy all files in a folder
What prevents you from iterating through the list of files returned through
.GetFiles()
?Vasudevan Deepak Kumar Personal Homepage
Tech Gossips
A pessimist sees only the dark side of the clouds, and mopes; a philosopher sees both sides, and shrugs; an optimist doesn't see the clouds at all - he's walking on them. --Leonard Louis Levinson -
Hi, I got the answer . Thank u I Modified the code a little : DirectoryInfo df = new DirectoryInfo(@"C:\Inetpub\wwwroot\Sample\images"); foreach(FileInfo f in df.GetFiles()) { string p = f.FullName.Replace("images", "New Folder"); File.Create(p); }