C# to Copy Files/Folders Fast

Using the XCOPY command you can copy files and folders from one machine to another machine.

Here I will show you how we can execute XCOPY using C # but before showing that piece of code I would prefer to provide some explanations of XCOPY. So, here you go:

1. In computing, Xcopy is a command used in PC DOS, MS-DOS, OS/2, Microsoft Windows, and related operating systems for copying multiple files or entire directory trees from one directory to another and for copying files across a network. Xcopy stands for extended copy, and was created as a more functional file copying utility than the copy command found in these operating systems.

Source: http://en.wikipedia.org/wiki/Xcopy

To get more details about XCOPY you can visit the following link:

http://technet.microsoft.com/en-us/library/bb491035.aspx

Xcopy is more powerful than a simple copy function in .Net like-: Xcopy does a lot of things (buffering, error check, etc.) that are not easy to code by yourself, but you can always start a new process with Xcopy in the command line.

Here is the Code for the same:

Rate this post