我有从文件夹中删除文件的代码,但是当文件=从文本框中的文本到文件夹时我需要复制文件
我的代码:
Textbox1.Text = 3.2.3
Textbox2.Text = 00420
Private Sub Button3_Click(sender As Object, e As EventArgs) Handles Button3.Click
Dim Folder = "C:\Windows\Temp\svn\"
If Directory.Exists(Folder) Then
Do Until Folder = ("*_" + TextBox2.Text + "." + TextBox4.Text + ".sql")
For Each _file As String In Directory.GetFiles(Folder, "*.sql")
File.Delete(_file)
Next
For Each _folder As String In Directory.GetDirectories(Folder)
DeleteFilesFromFolder(_folder)
Next
Loop
End If
End Sub
文件夹中的文件:
OptimumClinicals_3.2.3.00000.sql OptimumClinicals_3.2.3.00138.sql OptimumClinicals_3.2.3.00245.sql OptimumClinicals_3.2.3.00277.sql OptimumClinicals_3.2.3.00331.sql OptimumClinicals_3.2.3.00420.sql OptimumClinicals_3.2.3.00475.sql OptimumClinicals_3.2.3.00520.sql OptimumClinicals_3.2.3.00567.sql OptimumClinicals_3.2.3.00614.sql OptimumClinicals_3.2.3.00680.sql OptimumClinicals_3.2.3.00801.sql OptimumClinicals_3.2.3.01062.sql OptimumClinicals_3.2.3.01160.sql OptimumClinicals_3.2.3.01493.sql OptimumClinicals_3.2.3.01548.sql OptimumClinicals_3.2.3.01680.sql OptimumClinicals_3.2.3.01875.sql OptimumClinicals_3.2.3_0.00000.sql OptimumClinicals_3.2.3_0.00330.sql OptimumClinicals_3.2.3_1.00000.sql OptimumClinicals_3.2.3_3.00000.sql