Skip to content
Scott Lahteine edited this page Mar 23, 2016 · 2 revisions

DO NOT EDIT THIS PAGE. The wiki is being ported to a new documentation system.
Please see Issue #3088 "New Documentation" for more information.

Table of Contents

Description

Print the contents of the SD card to serial output. Files and folders deeper than the MAX_DIR_DEPTH setting will not be listed.

Example

 M20

This command produces output in DOS filename format similar to:

 CHRYSL~1.GCO
 CHRYSL~2.GCO
 /MISCEL~1/BEARIN~1.GCO
 /MISCEL~1/BEARIN~2.GCO
 /MISCEL~1/BEARIN~3.GCO
 /MISCEL~1/BEARIN~4.GCO
 /MISCEL~1/SCOOP/SCOOP-~1.GCO
 /MISCEL~1/SCOOP/SCOOP-~2.GCO
 /MISCEL~1/SCOOP/SCOOP-~3.GCO
 /MISCEL~1/SCOOP/SCOOP-~4.GCO
 /MISCEL~1/SCOOP/SCOOP-~5.GCO
 /MISCEL~1/SCOOP/SCOOP~23.GCO
 /MISCEL~1/PPW/PPWFIS~1.GCO
 /MISCEL~1/PPW/PPWHOL~1.GCO
 /MISCEL~1/PPW/PPWHOL~2.GCO
 /MISCEL~1/PPW/PINKPA~1.GCO
 /MISCEL~1/ARMCHAIR/ARMCHA~1.GCO
 /MISCEL~1/ARMCHAIR/ARMCHA~2.GCO
 /MISCEL~1/HEADPH~1/PHONEC~1.GCO
 /MISCEL~1/HEADPH~1/PHONEC~2.GCO

Discussion

M20 prints a listing of all files on the SD card in the machine to the serial output with their full DOS 8.3 paths. (Currently there is no method to obtain FAT32 long filenames through GCode.)

Notes

M20 does a recursive dive of the file system up to a set limit. If the folder structure is very deep, M20 may fail to list the full contents of the SD card, and even corrupt the stack. Make sure your board can handle your MAX_DIR_DEPTH setting.

Clone this wiki locally