Sorting directory listing problem in Coldfusion

Ask a Question related to Coldfusion - Advanced Techniques, Design and Development.

  1. #1

    Default Re: Sorting directory listing problem in Coldfusion

    mlam01, it's sorting files correctly.

    You're seeing "10" and "2" as numbers, where obviously 2 < 10, so it should
    come first.

    However, filesystems see filenames as strings, so the "1" in "10" comes before
    "2" and all numeric values come before alpha values. For example, this is
    correclty sorted:

    001
    1
    10
    2
    3
    4
    A
    B

    HTH

    cf_menace Guest

  2. Similar Questions and Discussions

    1. Directory Listing Denied
      when I configure the sample of the .net framework, the browser list this message .,? Directory Listing Denied This Virtual Directory does not...
    2. Sorting directory listing problem in Coldfusio
      why don't you try naming your number folders like so. 01, 02, 03, 04, 05....10, 11, 12, 13 That should fix your problem. Tim
    3. Directory listing
      Hi php-general, I'm reading through the filesystem function of php and I can't find any function which will list me all the files which are in a...
    4. [PHP] directory listing
      Wrong place, look at directory functions ;) Matthias Wulkow wrote:
    5. CD Directory Listing
      Is it possible to get the Directory listing from a CD in order to write it to a searchable database? If so does anyone know where I can get this...
  3. #2

    Default Re: Sorting directory listing problem in Coldfusion

    Note that CFQUERY in a query of queries will sort the contents of the directory using a case sensitive search, so Catalog will not necessarily appear between 'cat' and 'dog'.
    sdwebguy99 Guest

Posting Permissions

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

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139