Sort files and folders by natural order ("100" follows "2")
See original GitHub issueAdd option to sort folders alphabetically
Behavior
Expected order
1-foo
20-bar
110-baz
Actual order
1-foo
110-baz
20-bar
Example
Issue Analytics
- State:
- Created 3 years ago
- Reactions:7
- Comments:12 (8 by maintainers)
Top Results From Across the Web
Sort files and folders by natural order ("100" follows "2") #2977
They are already sorted alphabetically, what you're requesting is called natural sorting. Don't forget to also send a feature request to GitHub ...
Read more >C# Sort files by natural number ordering in the name?
I know this might be late, but here is another solution which works perfectly FileInfo[] files = di.GetFiles().OrderBy(file => Regex.
Read more >Why Numeric File Names are Sorted Differently
File names are stored as strings in almost every operating system and database management system. While this works well in most cases, it...
Read more >How to sort file when reading them with dir ? - MATLAB Answers
Convert each filename to the corresponding number (strip leading doc_ and trailing .txt, then use double); next, sort the numbers and get the...
Read more >ls - List files sorted numerically - Unix & Linux Stack Exchange
-V, --version-sort natural sort of (version) numbers within text ... upper- and lowercase together, and properly handles directories intermixed with files:.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
They are already sorted alphabetically, what you’re requesting is called natural sorting.
Don’t forget to also send a feature request to GitHub as it would be better if they fixed this natively: https://github.com/contact
Ahh, any update or a hack on this issue? I really am managing the files in the order, but after reaching at
9
the10th
file is moved to second position. Any help would be beneficial 😄