M500 are not files, they are G-code commands (well, they are actually M-codes, but don’t worry about that)1.
To reset your printer to the factory default settings, simply connect a terminal and send
If you are using Linux, see How to directly send G-code to printer from a Linux terminal?
1 Simply put: G-codes control movement; whereas M-codes control other functions (which aren’t movements).
Read more here: Source link