Sort a folder list retreived from FileSystemObject in reverse file date order.
Posted on 2005-04-18
Here is a snip of my current code. Currently, the folder list is sorted alphabetacly.
I want objFolderContents to be sorted in reverse file date order(newest folder at the top)
Set objFSO = CreateObject("Scripting.FileSystemObject")
strPathInfo = baseDir & "\users\" & gp
Set objFolder = objFSO.GetFolder(strPathInfo)
Set objFolderContents = objFolder.SubFolders
'Run a loop through the directory list
For each FolderItem In objFolderContents
I have found several examples of sorting in ASP but I'm having a lot of trouble getting them to work. Is it because I am using a "set object"?
Or maybe is it possible to ask FileSystemObject for the list sorted the way I want?
I need an example that will work with my code.