Author Topic: Sorting by filename  (Read 6200 times)

Offline iau

  • Newcomer
  • *
  • Posts: 31
    • View Profile
Sorting by filename
« on: May 10, 2007, 12:38:36 PM »
I tried searching for this, but couldn't find the answer.

I want to use PM for renaming files, but it won't sort the files properly despite having filename as sorting option. I have a bunch of files named Untitled-1, Untitiled-2 and so on. When I sort them in the navigator Untitled-11 shows up before Untitled-2.

I'm sure there is a simple explanation to this, but I haven't been able to discover it. Btw, sorting in Windows Explorer is correct. I'm using PM 4.5.1 Beta, but had the samme issues with 4.5.

Any help appreciated!



Offline JoeUser

  • Newcomer
  • *
  • Posts: 4
    • View Profile
Re: Sorting by filename
« Reply #1 on: May 10, 2007, 12:46:04 PM »
The answer is simple I think; the explorer interprets decimals in a filename as numbers and sort accordingly.  PM on the other hand sorts purely based on the alphabetical order.  If you prefix you numbers with 0s (e.g., 1 becomes 01), the sorting should be fine again.

Hope this helps,
    Joe

Offline Kirk Baker

  • Senior Software Engineer
  • Camera Bits Staff
  • Superhero Member
  • *****
  • Posts: 25054
    • View Profile
    • Camera Bits, Inc.
Re: Sorting by filename
« Reply #2 on: May 10, 2007, 12:48:49 PM »
I tried searching for this, but couldn't find the answer.

I want to use PM for renaming files, but it won't sort the files properly despite having filename as sorting option. I have a bunch of files named Untitled-1, Untitiled-2 and so on. When I sort them in the navigator Untitled-11 shows up before Untitled-2.

I'm sure there is a simple explanation to this, but I haven't been able to discover it. Btw, sorting in Windows Explorer is correct. I'm using PM 4.5.1 Beta, but had the samme issues with 4.5.

The filename sort is alphabetical and does not take numbers into account.

You can rearrange the files by dragging them into the desired order and then perform your rename.

-Kirk

Offline iau

  • Newcomer
  • *
  • Posts: 31
    • View Profile
Re: Sorting by filename
« Reply #3 on: May 10, 2007, 12:53:09 PM »
Thanks for the fast response!

I suspected I could solve the problem with adding the zero, but was hoping there was an easier way. These are files from a scanner and Photoshop gives them this name by default.


Offline iau

  • Newcomer
  • *
  • Posts: 31
    • View Profile
Re: Sorting by filename
« Reply #4 on: May 10, 2007, 11:08:07 PM »

The filename sort is alphabetical and does not take numbers into account.

You can rearrange the files by dragging them into the desired order and then perform your rename.

-Kirk


Could I just ask why you have made sorting only alphabetical and not have an option to sort with numbers?
« Last Edit: May 10, 2007, 11:10:29 PM by iau »

Offline Kirk Baker

  • Senior Software Engineer
  • Camera Bits Staff
  • Superhero Member
  • *****
  • Posts: 25054
    • View Profile
    • Camera Bits, Inc.
Re: Sorting by filename
« Reply #5 on: May 10, 2007, 11:45:39 PM »

The filename sort is alphabetical and does not take numbers into account.

You can rearrange the files by dragging them into the desired order and then perform your rename.

Could I just ask why you have made sorting only alphabetical and not have an option to sort with numbers?

Sure.  We sort all of the letters alphabetically, including digits which are letters.  We could try and parse out numbers, but they really can appear anywhere in a name, not just at the end of names like in your example.  If you want a numeric-parsing filename sort, then please feel free to request it in the Feature Requests section.

-Kirk