Hi,
I wan to copy my directory from a loc to another.
But i just able to move.
Below is my code.

PathToMove = "C:\hey\nana\" 
Destination = "C:\you\nana\" 



If Directory.Exists(Destination) Then
Dim objDir As New DirectoryInfo(Destination)
objDir.Delete(True)
msgbox("done")
End If

Try
If Directory.Exists(PathToMove) Then
Directory.Move(PathToMove, Destination)
Else
msgbox("Error")
End If

Catch ex As Exception
Console.Write(ex.ToString)
End Try
End If

It just can move but cant copy i wan maintain the folder in destination after copy to path. Thanks.Pls help

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.