i want to sort the files in the listbox based on the time and date

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

hi, below is the code
pls help me i want the listbox items to be files appeared based on the time
and creation of a file. mean sorting....
thanks

Dim myDirInfo As DirectoryInfo
myDirInfo = New DirectoryInfo("\program
files\SmartDeviceApplication3\InspectionFiles")
Dim myFilenames As FileInfo() = myDirInfo.GetFiles()
Dim myFilename As FileInfo
For Each myFilename In myFilenames
i = i + 1
ListBox1.Items.Add(myFilename.Name)
Next
 
Back
Top