I am trying to move the directory from one location to another location on the same drive. I am getting \"Cannot create a file when that file already exists
You can just call
Microsoft.VisualBasic.FileIO.FileSystem.MoveDirectory(source, destination, true);
What it does internally is it creates the target directory if it's not exists and then it iterates over the source directory's files and moves them to the target directory. That way the problem of "Cannot create a file when that file already exists" won't happen.
You'll need to add Microsoft.VisualBasic as a reference.