Visual Basic NET ( 3)




, , ,


VB , Windows, : , , . File System.IO. Directory System.IO.

c: temp 222, 333, 666, 999 1.txt 2.txt.

. , StreamWriter, :

Dim As New System.IO.StreamWriter("E:\VB\Filimon.txt")

.

File:

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click

' 1.txt temp c: 222 temp c:

File.Copy("c:\temp\1.txt", "c:\temp\222\1.txt")

' 1.txt , 222:

File.Copy("c:\temp\1.txt", "c:\temp\222\1.txt", True)

' 1.txt 3.txt temp c: 222 temp c:

File.Copy("c:\temp\1.txt", "c:\temp\222\3.txt")

' 1.txt 4.txt temp c: :

File.Copy("c:\temp\1.txt", "c:\temp\4.txt", True)

' 1.txt temp c: 333 temp c:

File.Move("c:\temp\1.txt", "c:\temp\333\1.txt")

' 3.txt 5.txt 222 temp c: temp c:

File.Move("c:\temp\222\3.txt", "c:\temp\5.txt")

' 4.txt temp c: 6.txt:

File.Move("c:\temp\4.txt", "c:\temp\6.txt")