Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

fso file/dir order

Status
Not open for further replies.

itflash

Programmer
Jul 18, 2001
535
GB
hi all

i can get a list of files and sub directories from a directory on the server to display to my user using the scripting object. but how do i vary the order i display them to the user. i.e. ascending/descending/modifed date.

Thanks
ITFlash
 
try putting the file information into an array by :

dim array()
redim array(NumOfItems) - number of items in your array

i = 0
for each Item in FSO.FOLDER.FILES
array(i) = Item.name
i = i + 1
next

then display items from array

putting a "step -1" in your for loop will decrement

for FSO.FOLDER.FILES.COUNT to 0 step -1
response.write ARRAY(i)
next
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top