Essential C# File and Stream IO  Suggest an edit

Copy File

File static class

File static class can be easily used for this purpose.

File.Copy(@"sourcePath\abc.txt", @"destinationPath\abc.txt");
File.Copy(@"sourcePath\abc.txt", @"destinationPath\xyz.txt");

Remark: By this method, file is copied, meaning that it will be read from the source and then written to the destination path. This is a resource consuming process, it would take relative time to the file size, and can cause your program to freeze if you don’t utilize threads.

Table Of Contents
22 Enum
96 File and Stream IO
107 Stream
108 Timers
  ↑ ↓ to navigate     ↵ to select     Esc to close