Jump to content

Numeric sort of files in folder view


Benas

Recommended Posts

Hi, currently im sorting files in folder mode by name. However, my podcasts are named as follows:

Podcast 1 - Subject1
Podcast 2 - Subject2
Podcast 10 - Subject10

Poweramp shows them in the following order:

Podcast 1 - Subject1
Podcast 10 - Subject10
Podcast 2 - Subject2

In some software like Total commander, there is an option to use "numeric" sort method where 2 comes before 10. Is it possible to do this in Poweramp? 

Plan B would be renaming the files but im aiming to avoid it. I see older topics in this folder with the same question but these topics are years old. I wonder if there are any updates, workaround suggestions, Poweramp addons that would analyse strings of file names etc.

Thanks!

Edited by Benas
Link to comment
Share on other sites

15 minutes ago, Benas said:

In some software like Total commander, there is an option to use "numeric" sort method where 2 comes before 10. Is it possible to do this in Poweramp? 

Plan B would be renaming the files but im aiming to avoid it.

Sorry, no, Poweramp's sorting for filenames and folders uses accurate character-by-character alphanumeric (ASCII) string sorting rather than the kind of hybrid derived value system that you mention. Even the option to ignore articles ("The", "A" and "An") only applies to certain textual fields such as Albums, Artists and Composers, not to filenames - although personally I feel that setting should logically also apply to Track Titles too.

The correct solution, as you have surmised, is to use leading zeros for any single-digit numbers at the start of filenames, thus:

Podcast 01 - Subject1
Podcast 02 - Subject2
Podcast 10 - Subject10

The same applies to leading digits for the purpose of track numbering, where you should use 01, 02, 03 ... 10, 11, 12, etc. That format works perfectly whether filenames are sorted accurately or in a derived total-value manner.

Andre

Link to comment
Share on other sites

I wanted to make the same request. I download a lot of audio books from Audible and the folders and filenames are named by Audible like this: <artist> - Episode 1 - <title>. In Poweramp, right after this folder comes <artist> - Episode 10 - <title>.

 

I have hundreds of folders named this way because they are named like this by Audible. There are even audio books with over hundred episodes. I don't want to rename every folder manually after I download it and I also don't want to rename every file manually. This would take days! For example in Windows 10 the sorting is correct (Episode 1, Episode 2,..., Episode 10). Plus it doesn't look and read good to have something like "Episode 001".

 

Isn't it possible to have the option to change the sorting to numeric instead of lexicographic?

Link to comment
Share on other sites

You could use a bulk renamer tool, but I agree it's a bit of a faff for a lot of files (especially when new ones keep arriving). Do these files not contain embedded Track# data to allow them to be sorted by Track into the correct order?

The problem is that Poweramp is actually sorting the text strings completely accurately - i.e. character by character, where "aa" comes before "ab" and then "b", "ba", "c", etc. The same rule then applies to digit characters: "11", "12", "2", "21", "3", etc.

However, PA does already have an option to ignore uppercase/lowercase differences (which would otherwise cause strings starting with "A" - "Z" to be placed before anything starting with "a" - "z") and also a feature to ignore prefix articles ("A", "An", The" at the start of word-based tags). So I can't see it would be impossible to add a context-aware sorting option too - probably for text-based tags only (Title, Artist, Album, etc) rather than for the more technically-sorted folders/filenames though. Such a new option could also be designed to ignore punctuation marks - such as David Bowie's "Heroes" where technically the quotation marks are part of the title, or songs with bracketed portions such as Bryan Adam's (Everything I Do) I Do It For You. Currently, all of these appear the the start of the All Songs list, which is not especially desirable for finding stuff.

For example, the following ordering exists at the start of my All Songs titles list, and it really doesn't make much sense unless you speak fluent ASCII:

image.png

Andre

Link to comment
Share on other sites

1 minute ago, andrewilley said:

You could use a bulk renamer tool, but I agree it's a bit of a faff for a lot of files (especially when new ones keep arriving). Do these files not contain embedded Track# data to allow them to be sorted by Track into the correct order?

I have a bulk renamer but I am not so much into it that I can set it up to look for a specific string, then if a number in this string is single digit and add a leading 0 to it. Pretty sure it works but I don't know how I can accomplish it.

 

The files have a track number but files are not mainly the problem (although I sort by filename instead of track# for the reason that I also have podcasts in single files). The problem are the folders as I can't sort them by track#.

Link to comment
Share on other sites

1 hour ago, dende82 said:

The problem are the folders as I can't sort them by track#.

You can sort the contents of folders by Track#, but not the actual folder names themselves of course.

If a 'Content Aware' sort mode were to be implemented - to handle numeric content in a human-readable way, ignore punctuation, etc - then I think it should be available as an option in each List Options menu, rather than a global setting. So instead of 'Reverse' being the only sort-mode modifier, there would be a short list of tickable modifiers, such as:

    □  Ignore UPPER/lower Case
    □  Ignore Prefix Articles ("A", "An", "The")
    □  Content Aware Sorting
    □  Reverse

This would make the existing 'Articles' global option in Settings > Library > Lists redundant (so update any relevant List Options menus first, and then remove the global entry from the Settings menu) and also replace any other case sensitive sort features, such as sorting "By Path (case sensitive)".

Andre

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...