[FR] Add reverse sort of file names on SD #24937
Labels
F: SD Card / Media
Fix Included
A fix is included in the description
T: Feature Request
Features requested by users.
Is your feature request related to a problem? Please describe.
Currently files could be sorted by name, with option recent FAT entry first. So it could be difficult find new file.
Are you looking for hardware support?
No response
Describe the feature you want
Some slicers (at least Prusa) allows add date/time at the file name beginning like 202221028-174608. Reverse sort puts new file at the list top.
Additional context
Actually I built Marlin with such sort. Just changed
#define _SORT_CMP_NODIR() (strcasecmp(sortnames[o1], sortnames[o2]) > 0)
to
#define _SORT_CMP_NODIR() (strcasecmp(sortnames[o1], sortnames[o2]) < 0)
in Marlin/src/sd/cardreader.cpp
I can add config option and create PR if it seems reasonable.
The text was updated successfully, but these errors were encountered: