lpatnaik
Programmer
- Jul 11, 2002
- 53
Can anyone tell me how to sort files in a folder according to the creation time or modification time through asp.net
As of now, i am just fetchning and displaying the file names. But i need to display them in a sorted order, latest files first.
My code :
Dim objDirInfo As DirectoryInfo
Dim arrFiles() As String
objDirInfo = New DirectoryInfo(strPath)
If objDirInfo.Exists = True Then
arrFiles = Directory.GetFiles(strPath)
As of now, i am just fetchning and displaying the file names. But i need to display them in a sorted order, latest files first.
My code :
Dim objDirInfo As DirectoryInfo
Dim arrFiles() As String
objDirInfo = New DirectoryInfo(strPath)
If objDirInfo.Exists = True Then
arrFiles = Directory.GetFiles(strPath)