(New to .NET) How do I copy a file from one folder, and rename it in another folder?

  • Thread starter Thread starter AppleBag
  • Start date Start date
A

AppleBag

Hello everybody,

As the topic suggests, I would like to take for example "C:\pics\1.jpg"
and copy the image to "D:\stuff\5.jpg".

Same exact picture (a copy of the file), but rename it and place it in
a new directory?

Thank you in advance for any help!
 
AppleBag said:
Hello everybody,

As the topic suggests, I would like to take for example "C:\pics\1.jpg"
and copy the image to "D:\stuff\5.jpg".

Same exact picture (a copy of the file), but rename it and place it in
a new directory?

File.Copy ("c:\\pics\\1.jpg", "d:\\stuff\\5.jpg");
 
Back
Top