01.
Private
Overloads
Sub
Button1_Click(
ByVal
sender
As
System.
Object
,
ByVal
e
As
System.EventArgs)
Handles
Button1.Click
02.
03.
Try
04.
Dim
FSO
As
Object
05.
Dim
strSource
As
String
, strDestination
As
String
06.
07.
strSource =
"D:\Test1\MRPII.BaseData.txt"
08.
strDestination =
"C:\Program Files\Test2\"
09.
FSO = CreateObject(
"Scripting.FileSystemObject"
)
10.
FSO.CopyFile(strSource, strDestination,
True
)
11.
Label2.Text =
"success!!"
12.
FSO =
Nothing
13.
14.
Catch
ex
As
Exception
15.
16.
Label2.Text =
"No success!!"
17.
18.
End
Try
19.
20.
End
Sub
21.
22.
23.
24.
25.
26.
End
Class