A
ahmeddc
Guest
HI
How to Display all files in the folder and subfolder in same folder in DataGridView .
my code not work''
Dim maindr As String = "D:\New folder"
Dim directoryf As String = Path.GetFileName(maindr)
Dim bool As Boolean = IO.Directory.Exists(maindr)
If bool = true Then
For Each sDir In Directory.GetDirectories(maindr, directoryf, SearchOption.AllDirectories)
For Each File In Directory.GetFiles(sDir)
Dim detailedfile As New IO.FileInfo(File)
FOLDERDETAILS.DATAG_FOLDER.Rows.Add(detailedfile.Name, detailedfile.LastAccessTime, detailedfile.Extension)
Next
Next
End If
Continue reading...
How to Display all files in the folder and subfolder in same folder in DataGridView .
my code not work''
Dim maindr As String = "D:\New folder"
Dim directoryf As String = Path.GetFileName(maindr)
Dim bool As Boolean = IO.Directory.Exists(maindr)
If bool = true Then
For Each sDir In Directory.GetDirectories(maindr, directoryf, SearchOption.AllDirectories)
For Each File In Directory.GetFiles(sDir)
Dim detailedfile As New IO.FileInfo(File)
FOLDERDETAILS.DATAG_FOLDER.Rows.Add(detailedfile.Name, detailedfile.LastAccessTime, detailedfile.Extension)
Next
Next
End If
Continue reading...