|
-
Oct 28th, 2009, 10:23 PM
#1
Thread Starter
Lively Member
how to copy folder along with content to another new folder??
hi all,i have a problem here,
i want to copy folder along with content to another new folder,
i use this code
Dim source As String = ""
Dim destination As String = ""
source = "C:\Documents and Settings\user\Desktop\weapon"
destination = "C:\weapon\"
Try
If Not Directory.Exists(source) Then
MsgBox("file yg mo dipindahkan tidak ada")
Return
End If
If Directory.Exists(destination) Then
MsgBox("file destination sudah ada")
Return
End If
Dim a As DirectoryInfo = New DirectoryInfo(source)
a.MoveTo(destination)
Catch ex As Exception
MsgBox(ex.Message)
Return
End Try
this code make me copy source to destination but also delete source,
this code delete folder source and move to destination.
All i want is not delete folder source.
anyone can help me??
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|