M30 --ignore-file-not-found



  • Not important feature, but nice to have.
    Way to tell M30 to ignore and not report error if file is not found.

    Why?
    I do something like:

    curl.exe -G --data-urlencode "gcode=M30\"%filename%%extension%\"" http://ender5.local.lan/rr_gcode
    curl.exe  --data-binary "@%if%" "http://ender5.local.lan/rr_upload?name=gcodes/%filename%%extension%"
    

    so delete a file, upload a file, and if a file is now (do not exist on the duet) M30 returns the error that lingers forever on the web till I manually close it. Not a big issue but a nuisance 🙂


  • administrators

    Unfortunately the M30 command was specified (before I got involved with 3D printing) as taking a filename argument with no parameter letter to introduce it. So there is no possibility of adding a parameter to it to specify whether or not it is an error if the file doesn't exist. We would need to introduce another M-code, possibly M30.1.



  • yeah weird that it's not M30 P"filename" 🙂
    M31.1 would work too 🙂



  • @dc42 one other thing .. I don't see why is M30 "nonexistingfile" ERROR and not WARNING ? The syntax is ok, the "file not found" should IMO be warning and not error.


  • administrators

    Good point. I'll change it to Warning in release 3.2.


  • administrators

    btw as you are using curl to send the command, instead of sending a M30 command you could instead send:

    rr_delete?name=/gcodes/myfile.gcode



  • @dc42 good point, still looking at those hooks ..

    changed S3D postprocessing script to

    @echo off
    
    for %%a in (%1) do (
        set filepath=%%~dpa
        set filename=%%~na
        set extension=%%~xa
    )   
    set if=%filepath%%filename%%extension%
    
    G:\bin\curl-7.50.3-win64-mingw\bin\curl.exe                        "http://ender5.local.lan/rr_delete?name=gcodes/%filename%%extension%"
    G:\bin\curl-7.50.3-win64-mingw\bin\curl.exe  --data-binary "@%if%" "http://ender5.local.lan/rr_upload?name=gcodes/%filename%%extension%"
    

Log in to reply