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.

Sorry for the interruption on this subject, but I just had my Ender3 quit about 3/4 the way through a print and the machine stopped and the screen went blank. I tried to reboot but the screen was all blue, nothing showing. I’ve checked all the wiring and disconnected power. Rebooted and the machine came on but it won’t read the SD card. On the PC the card seems to be blank and on the Ender even though I put the card back in it won’t read. Any ideas?

This is a very different subject and you should really start a new topic with it.

When you put the SD card in a a computer, you said the card appeared blank. Could you write to it? SD Cards are notoriously fickle and I find this to be especially true of the ones that came with the machine. If this is your original SD card (that came with the printer), I would recommend buying a new one. The biggest problem you’ll have is finding an SD card that’s small enough. I don’t know what the maximum size is that the Ender 3 can read, but I wouldn’t want to go larger than 16GB to be on the safe side. SD cards are cheap and it’s tempting to get the biggest one you can but a lot of older or cheaper equipment can’t read the large ones. It’s also kind of pointless to buy a big one since a GCODE file might be 25MB in size so you’d be able to store 40 of them on a 1GB SD card so on a 16GB SD Card you can store over 655 files (16*1024/25) which, let’s face it, would make the Ender’s menu system unusable. Heck, even 40 files on a 1GB card would be tedious to search, and that’s assuming the files are all 25MB. Most of mine are less.

Thank man. I’ve been trying to find out where to start a new topic and just noticed the arrow bottom right.
I have just started up my printer inserted a new SD card 32 bits. the machine sees the card but when I go to the next menu it says there is no card. I don’t know what’s up all confusing.

Ok I found the right spot to start a topic,
So my SD card on the Ender3 sees the card on the first screen, but when I go to the next screen it says no TF card. Any ideas, thanks

I assume you meant 32GB? It’s possible the machine won’t read more than 16GB. I’ll leave it for others who have an Ender 3 to confirm the maximum SD card size. If the card capacity is OK, then make sure it’s formatted with a FAT32 file system. I have tonnes of SD cards that will read OK on one computer or one SD Card reader but be unreadable on another. Or my other pet peeve: you insert one and it mounts as “read only” so you can’t write or erase any files. I hate them. I’d rather just use a thumb drive. Anyway, personal rants aside, try a different, smaller card.

Sorry for responding to an old post. I try to answer questions when I can if nobody has answered them correctly (and if I think I may know without just making guesses). I believe the hidden file named “Desktop.ini” that is on just about every SD card that is formatted on a PC holds the information on how the SD card should be sorted and viewed. If this file is changed or deleted, then it may be able to change the war the Ender machines sort and show the files. There may also be information stored within files from the Slicer program, but I don’t think so. I don’t recall ever hearing that 3d printers and/or slicers create their own hidden files either.

I believe that if you change the way the files are sorted when viewing them in Windows and then you eject the SD card before removing it from the computer, it may save the options for sorting the files the way you want. I believe what happened to me was that I never ejected my SD card and it was always sorting files by newest first… but then one time I ejected the card and it saved different settings on the card… so when I went back to the SD card in windows, I sorted them how I wanted and then ejected with Windows before removing the card. Just changing the sorting of the files did not fix the problem alone, but it might be worth a try first/anyways. The card can also be ejected either with the slicer program or windows. I’m not sure if there is any difference though. The first time when it got unsorted I ejected with the slicer program… and the 2nd time that fixed the problem was when I ejected with Windows explorer.

Also, deleting the desktop.ini file could work (it will be automatically replaced with a new one) and/or reformatting the SD card is a possible fix also. Just gotta make certain to backup any important files on the card before reformatting, because it will erase all the files on the SD card. I hope this helps for anyone with the same issue. I know it’s an old question, but it’s still relevant and still happens with the Ender 3 and other/newer Ender printers (regardless of firmware).