Author: may215 | Posted on: 12/3/2008 4:20:08 AM | Views : 450

 Hi...
I have folders that contains files, and i want to move them to another location, so i tried to use  Directory.MoveTo() function, and i get the following error:
"Cannot create a file when that file already exists."
I am using the following code:
DirectoryInfo di = new DirectoryInfo("c:\OldFolder");
 di.MoveTo("c:\NewFolders");
** The folder(NewFolders) that i want to move the OldFolder(with its content) to it, already exists.

How can i solve this?
Is there any better way to do that?

Thanks...

...

Go to the complete details ...