I want to copy files from one folder to another using c#. The path of the folders are as below
String sourceFolder = @"C:UsersDesktopSource";
String destinationFolder = @"C:UsersDesktopDestination";
Please provide the code to copy files from sourceFolder to destinationFolder
To copy files from source to destination you can use below c# code
The above code will copy file named myFile.txt which exists inside 'sourceFolder' to the folder named as 'destinationFolder'.
We use System.IO for this purpose which is commonly used for input output file operations like creating directories, copying files, moving files, deleting files, etc in C#
To copy files one location to another location in C#, simply use below code