-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathForm1.vb
34 lines (26 loc) · 1.32 KB
/
Form1.vb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
Public Class Form1
Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
Dim tabdos As System.Collections.Generic.List(Of String) = New System.Collections.Generic.List(Of String)(System.IO.Directory.EnumerateDirectories("C:\Users\Agex_Videos\AppData\Local\geoslam-data"))
Dim i As Integer = 0
For Each s As String In tabdos
s = tabdos(i)
s = s.Split("\")(UBound(s.Split("\"), 1))
If System.IO.File.Exists(tabdos(i) & "\results.laz") Then
My.Computer.FileSystem.RenameFile(tabdos(i) & "\results.laz", s & ".laz")
End If
i = i + 1
Next
End Sub
Private Sub Button2_Click(sender As Object, e As EventArgs) Handles Button2.Click
Dim tabdos As System.Collections.Generic.List(Of String) = New System.Collections.Generic.List(Of String)(System.IO.Directory.EnumerateDirectories("C:\Users\Agex_Videos\AppData\Local\geoslam-data"))
Dim i As Integer = 0
For Each s As String In tabdos
For Each foundfile In My.Computer.FileSystem.GetFiles(tabdos(i))
If Not foundfile.EndsWith(".laz") Then
My.Computer.FileSystem.DeleteFile(foundfile)
End If
Next
i = i + 1
Next
End Sub
End Class