Also, if you are simply wanting to copy one file from one location to another, you can use this call:
Dim outFileName As String = "myTXT.txt"
Dim input As String = My.Computer.FileSystem.SpecialDirectories.Desktop & "\myTXT.txt"
Dim output As String = My.Computer.FileSystem.SpecialDirectories.Desktop & "\TEST\" & outFileName
If IO.File.Exists(input) Then
If IO.Directory.Exists(output.TrimEnd.TrimEnd(outFileName.ToCharArray)) = False Then
If MsgBox("Directory does not exist:" & vbCrLf & output.TrimEnd(outFileName.ToCharArray) & vbCrLf & "Do you want to create it?", MsgBoxStyle.YesNo) = MsgBoxResult.Yes Then
IO.Directory.CreateDirectory(output.TrimEnd(outFileName.ToCharArray))
IO.File.Copy(input, output)
End If
Else
IO.File.Copy(input, output)
End If
Else
MsgBox("Could not find file specified:" & vbCrLf & input & vbCrLf & "Process aborted!")
Exit Sub
End If
This will make an exact copy.