Sort files by name in my webserver directory

Results 1 to 2 of 2

Thread: Sort files by name in my webserver directory

  1. #1
    Join Date
    Dec 1969

    Default Sort files by name in my webserver directory

    I would like to sort all my images files by names when i use this code..but i look arround for something saying "Sort" or what ever but cant get it.. I use the code to populate a ComboBox<BR><BR>Thanx !!<BR><BR><BR>===========MY CODE==========<BR>&#060;% Dim objFileScripting, objFolder<BR>Dim filename, filecollection, strDirectoryPath, strUrlPath<BR>strDirectoryPath="..imagesGrand_Titr e\" <BR>Set objFileScripting = CreateObject("Scripting.FileSystemObject") <BR>Set objFolder = objFileScripting.GetFolder(Server.MapPath("..image sGrand_Titre\")) <BR>Set filecollection = objFolder.Files <BR>For Each filename In filecollection <BR>Filename=right(Filename,len(Filename)-InStrRev(Filename, "\")) <BR>Response.Write "&#060;option value=&#039;" & strUrlPath & filename & "&#039;&#062;" & filename & "&#060;/option&#062;"<BR>Next%&#062;

  2. #2
    Join Date
    Dec 1969

    Default ASPFAQs, category File System Object

    There&#039;s an FAQ there that shows you how to sort files any which way. So just use the principles of that code but don&#039;t allow user-specified sorts.<BR><BR>

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts