Changing list order of prints on SD card

Ask the MakerGear community for assistance...
Post Reply
thecadman99
Posts: 42
Joined: Fri Apr 11, 2014 10:06 pm

Changing list order of prints on SD card

Post by thecadman99 » Thu Apr 02, 2015 3:10 pm

Anyone know where to change this in firmware?
My problem is I have a couple hundred files that I'm printing (from SD) pretty often.

My machines have different firmware and some of them list files alphabetically, while others have a strange combination of alphabetically with the newer files on the bottom.
Still another machine shows files sorted in reverse than the others.

I'd like to have them all list by simple alphabetical order, without putting newly created files at the bottom of the list.

Suggestions appreciated!

User avatar
ednisley
Posts: 1188
Joined: Fri Apr 11, 2014 5:34 pm
Location: Halfway up the Hudson
Contact:

Re: Changing list order of prints on SD card

Post by ednisley » Thu Apr 02, 2015 3:59 pm

thecadman99 wrote:have them all list by simple alphabetical order
There's not enough microcontroller RAM available to sort the files, so the firmware displays the names in whatever order it finds them, modified by the subdirectory order. The Marlin 1.0.2 firmware (looks like it) does a depth-first search through the directory tree, but that surely varies by version.

When you delete a file, that (sub)directory entry will be reused by the next file you write in the same (sub)directory, so the listing order gradually changes over time.

Basically, if you want the listing in a particular order, you must delete all the files, then write them to the card in one operation in whatever order you'd like to see. The root directory can hold only a limited number of files (IIRC, 512 for FAT16), so you might not be able to dump everything in there.

If you possess OCD of biblical proportions, you could set up subdirectories A, B, C, D, E ... and divvy the files up alphabetically within those. That'd get you pretty close to the goal and pretty close to the edge of madness.

Obviously, repeated whole-card deletes and writes chew up the card's life expectancy ...

thecadman99
Posts: 42
Joined: Fri Apr 11, 2014 10:06 pm

Re: Changing list order of prints on SD card

Post by thecadman99 » Fri Apr 03, 2015 4:30 pm

Thanks Ed! Thats exactly what I didn't want to hear :D

I have been keeping a master file on my computer and re-writing each card when I can't take the constant searching for files, just to get them back into some sort of order.
I do have partial organization by files, but even those seem random in their read placement (one machine has reverse alphabetical file order :?: )

I appreciate you sharing your knowledge Ed- Impressive as always.

User avatar
ednisley
Posts: 1188
Joined: Fri Apr 11, 2014 5:34 pm
Location: Halfway up the Hudson
Contact:

Re: Changing list order of prints on SD card

Post by ednisley » Fri Apr 03, 2015 8:04 pm

thecadman99 wrote:sharing your knowledge
Obligatory XKCD:
https://xkcd.com/1479/

Glad to be of some help... [grin]

Post Reply