Ender 5 sd card file sorting

A few weeks ago my ender 5 decided it was going to sort files on the sd card differently. I’ve been trying to google a solution to this for about a week now with no success.
The calibration prints that I had loaded on the sd card prior to 3 weeks ago are still sorted based on the date created. Everything since then doesn’t make sense, day to day they don’t even sort properly (newest print should be top of the list).
Has anyone run across this before?

Yes, it’s currently happening to me. I created a file (PenHolder) which I later made four of and renamed the original 1XPenHolder and the new one 4XPenHolder, so you’d think they’d sort 4X… first then 1X… then older stuff, but instead I now get: [a bunch of stuff, including sub-directories] 1XPenHolder [some more stuff] 4XPenHolder, so not only is it not chronological, it’s not even alphabetical (given that numbers should sort before letters), nor by file type (STL files sorting above sub-directories). I can’t make heads or tails of it either.

What I can say is that it’s not a firmware issue in the sense that I haven’t changed my firmware since the update I did the day week I got the printer (November), so it’s not because the firmware changed.

We’ll at least I’m not alone.
Now it’s down to windows or cura I guess.
I’ll update cura tonight and see what happens but I don’t remember updating it when this started happening.

Out of all the problems I’ve had printing this one is tops the list for annoying. I’m not a fan of hunting for files that I’ve forgotten the name of in the 5 seconds it takes to move the card from the laptop to the printer.

I wouldn’t be too quick to eliminated the firmware as a cause.

I just got off 4, 13-hour days of election duty and, being a retiree who hasn’t worked more than a couple of hours per day at anything for years, I’m exhausted and I have a backlog of things that need to be done so I may not get around to investigating this for a while, but here’s one of my theories based on what I’ve observed on my own SD card:

(I am making so many typos writing this, it’s ridiculous)

The controller has a very limited amount of working RAM and the sorting of filenames can be quite costly, so I’m speculating that, if the amount of memory needed to sort the filenames reaches some defined limit, the algorithm gives up and we end up with a list that is only partially sorted.

As I say, I’m too tired to even type correctly, much less get to the bottom of this but it’s easy, if tedious, to test. Start with a couple of file names and keep adding them until sorting fails. Also, add long filenames. Most of mine don’t fit entirely on the display and their length may also contribute to the problem. (ie. does it try to sort the entire file name, or only take the first 8 letters, for example)

So I only had 12 files plus subdirectories on the card, I’ve cleared off 6 of the larger or less used prints. I added 2 new prints that aren’t very large and it does the same thing. My 3 calibration prints are in the order I want them in at the top, the 3 prints I left on the card are mixed in with the directories, and the 2 new ones are all mixy-matchy too.
The hunt continues.

Well that kills that theory. I have dozens of files and directories on mine which is why I thought I might be causing a memory overflow.

My sidewinder does the same there seems to be no logical sorting it isn’t alpha numeric or by time, It might be by size but why I have no clue. Artillery being associated with Creality, I guess that is similar. My purse has the ability to change the sort order , It can be done they just don’t.

I will be honest with you I have had it on my 5 plus for quite some time. Is a little annoying at times but as of yet have not had time to sort it out. I believe its a firmware issue but the memory overflow makes much more sense. I seem to remember an option in the firmware when I was building it about file sort order.

OK. So my next theory on this subject is that it could be the SD card’s file structure becoming fragmented as files are deleted and moved around and new files may or may not fit in the old gaps that are left and so may or may not be inserted among the remaining files or pushed to the end.

As I write this, I’ve created a directory on my computer into which I am cutting/pasting all of the SD card contents.

First, I’ll try copying the files back without any other cleanup attempts on the SD card to see what happens.

If that doesn’t “fix” it, I’ll try re-creating the root directory.

If that doesn’t work, I’ll try a re-format.

Wow, is my SD card ever slow. It’s an old one - only 4 giggle bytes - but I’ll post back here with the results. Going to watch something on Youtube while I wait for this to finish.

EDIT: Hours of Youtube videos later and the data from my SD card still hasn’t finished copying. Something is obviously wrong. This is turning into a project.

I’m glad there’s more than 2 of us with this problem now. More data to troubleshoot.
I updated cura and that seems to force all the new files to the bottom of the list (not where I want them, but at least predictable).
This problem is only an issue on my ender5 but not my 5 plus. I’ve had the Ender 5 for 2 years now and the 5plus barely a year.
Windows refuses to defrag the card, so I’m leaning towards a problem with the card.

My problems copying to and from the card had to do with me using Cut/Paste where Cut, of course, wants to erase the file after the copy. There is a way-too-long-standing problem with Linux in which SD cards sometimes get mounted Read-Only or randomly become Read-Only during operation and so you can’t erase a file whereupon I discovered a bug in ElementaryOS that’s causing the file manager to refuse to move on to the next file until it can complete the Cut operation on the previous file, which it can’t.

Anyway. I re-mounted the card, copied all the files to my hard drive and then separately erased them on the SD card.

After copying all the files back to the SD card, my directory shows up on the Ender5Pro in alphabetic order. Of course, I can’t tell if it’s actually chronological order since all the files were written back at the same time and Elementary OS sorts them alphabetically.

I won’t know if the Ender5’s file sorting is “fixed” until I upload another file after my current model prints.

interesting solution. Makes sense though. Linux always was a bit of hard core OS even though it has its own issues. Was always the Linux developers that has 12 different virtual machines running on there desktops because they had to test in different “situations”

Well that might have solved it. I cut my calibration files from the card to my desktop and put them back on the card. Saved a new print to the card and it is organized to the top of the list now. My calibration files aren’t organized correctly anymore but it’s closer to what I had 3 weeks ago.