Sub Button1_Click
Dim Listfile As List
Listfile.Initialize
' funzione ricorsiva per la ricerca dei file
ScanPath("C:\Android",Listfile)
' Visualizza lista file
For Each fn As String In Listfile
Log(fn)
' File size in byte: log(File.Size("",fn))
' only path: log(File.GetFileParent(fn))
' pnly filename: log(File.GetName(fn))
Next
Log($"TOTALE: ${Listfile.Size} files"$)
End Sub
Private Sub ScanPath(Path As String, Lf As List)
For Each fln As String In File.ListFiles(Path)
If File.IsDirectory(Path,fln) Then
ScanPath(File.Combine(Path,fln),Lf)
Else
Lf.Add(File.Combine(Path,fln))
End If
Next
End Sub