Long File Name Note - aegean-odyssey/mpmd_marlin_1.1.x GitHub Wiki
About Long File Names
Marlin firmware's file system code does NOT provide much support for Microsoft's long file name (LFN) additions to the DOS file system. Basically, Marlin firmware can only read a long file name that is associated with the "8.3 DOS" file name. This capability along with the firmware's support for the "8.3 DOS" file name format is adequate for our 3d printer with one memory card. However, we've added a few enhancements to make the printer a bit more user friendly.
-
The
M20
command, list sd contents, includes the optional parameterM20 P0
(list 8.3 file names) orM20 P1
(list long file names). As of firmware119r08
, the default is to list long file names when no optional parameter is provided. This change, along with the change to theM23
command, lets Octoprint display and open files using long file names with no special setup or configuration. -
The
M32
command (open file and print) and theM23
command (open file) accept either a long file name or an 8.3 file name. The command first tries to find the file by matching the long file name. If this is not successful, the command will again try to find the file by matching the short (8.3) file name. The search always begins at the root directory, so the path given as an argument to theM32
command should always begin with a "/
". Special characters can be quoted (escaped) by preceding the special character with a backslash "\
", though Marlin's design may make quoting a bit quirky. Due to a bug in Marlin, the "#
" character cannot be quoted correctly at all (perhaps this will eventually be fixed).
CAVEAT
Unfortunately, the Marlin commands to delete or create files on the micro SD card do NOT support long file names. It is important to avoid using these commands to delete a file (by using its short 8.3 file name ) that has a long file name attached to it. While the file itself will be deleted, the directory entries containing the long file name will not be deleted, leaving "garbage" directory entries on the memory card.