What is the best way to move directory with all its contents(files or folders) in C#?
I used the following codes, but it throws The Directory is not empty
The Directory is not empty
Use System.Io.
string source = @"c:\new"; string dest = @"c:\newnew"; Directory.Move(source, dest);