There is one built in from the Microsoft.VisualBasic.FileIO Namespace.
Don't let the name fool you, it is a very underrated namespace for C#. The static class FileSystem
has
a CopyFile
andCopyDirectory
method
that has that capability.
Pay Close attention to the UIOption
in
both the CopyFile
and CopyDirectory
methods.
This emulates the Windows Explorer copy window.
FileSystem.CopyFile(sourceFile, destinationFile, UIOption.AllDialogs);
FileSystem.CopyDirectory(sourceDirectory, destinationDirectory, UIOption.AllDialog