Duet3D Logo Duet3D
    • Tags
    • Documentation
    • Order
    • Register
    • Login

    Command to move/rename files

    Scheduled Pinned Locked Moved
    Firmware wishlist
    8
    29
    2.7k
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • Danalundefined
      Danal
      last edited by

      M31 is "time since start of SD print" on Marlin and many others.

      Perhaps, extend M33 instead. This is "get long name of file" in Marlin (and others) today.

      https://reprap.org/wiki/G-code

      Delta / Kossel printer fanatic

      1 Reply Last reply Reply Quote 0
      • dc42undefined
        dc42 administrators @wilriker
        last edited by

        @wilriker said in Command to move/rename files:

        @dc42 Marlin does use M31 to report current print time.

        The next unused M-Code according to https://reprap.org/wiki/G-code is M50. This is not used by Marlin or NIST CNC. It is though used by LinuxCNC and ReplicatorG according to a short research.

        In that case I suggest we allocate an unused (by RRF/NIST/Marlin) M-code in the 500 range or possibly the M400 range, assuming that M33-M35 are already taken (I expect they are, because I allocated M36).

        Duet WiFi hardware designer and firmware engineer
        Please do not ask me for Duet support via PM or email, use the forum
        http://www.escher3d.com, https://miscsolutions.wordpress.com

        wilrikerundefined 1 Reply Last reply Reply Quote 0
        • wilrikerundefined
          wilriker @dc42
          last edited by

          @dc42 said in Command to move/rename files:

          In that case I suggest we allocate an unused (by RRF/NIST/Marlin) M-code in the 500 range or possibly the M400 range, assuming that M33-M35 are already taken (I expect they are, because I allocated M36).

          I need to check on NIST but M470 is looking good so far. Will allocate it tomorrow then and provide a PR.

          Manuel
          Duet 3 6HC (v0.6) with RPi 4B on a custom Cartesian
          with probably always latest firmware/DWC (incl. betas or self-compiled)
          My Tool Collection

          1 Reply Last reply Reply Quote 1
          • dragonnundefined
            dragonn
            last edited by

            Will it support renaming folders too?

            wilrikerundefined 1 Reply Last reply Reply Quote 0
            • wilrikerundefined
              wilriker @dragonn
              last edited by

              @dragonn said in Command to move/rename files:

              Will it support renaming folders too?

              That's the plan.

              Also I just coincidentally stumbled across a request of the same feature by @resam that also asked for a way to create a directory via GCode. I will also allocate a M-Code for that and include it in my PR. Both a fairly trivial to do.

              Manuel
              Duet 3 6HC (v0.6) with RPi 4B on a custom Cartesian
              with probably always latest firmware/DWC (incl. betas or self-compiled)
              My Tool Collection

              1 Reply Last reply Reply Quote 1
              • 3dmntbighkerundefined
                3dmntbighker @wilriker
                last edited by

                @wilriker said in Command to move/rename files:

                Currently there are only two ways to move or rename a file: use DWC (which is using an HTTP call underneath) or remove the SD card from the Duet and do it on a computer.

                I propose an M-Code command to do the same. Looking at https://reprap.org/wiki/G-code there is nothing unused in the M20..M39 range but at least RRF is not using M31 so far.

                This ties into my suggestion that files with "._" and ".DS_Store" should at the very least be hidden. For that matter any file that starts with a period should really be ignored. Anyone who frequently mounts the SD card in Windows or Mac will likely find these droppings all over the place. I'd be just as happy if the Duet deleted all of these files when the SD card is mounted, but I realize that's not likely to happen. I'm mostly referring these files appearing in the 12864 file list.

                Scratch built CoreXY with Maestro
                Heavily modified Ender 3 with Maestro
                MPCNC work in progress with Duet WiFi

                dc42undefined 1 Reply Last reply Reply Quote 0
                • wilrikerundefined
                  wilriker
                  last edited by

                  I reserved M470 for creating a directory and M471 for moving/renaming files/directories. PR with implementation somewhen later today.

                  Manuel
                  Duet 3 6HC (v0.6) with RPi 4B on a custom Cartesian
                  with probably always latest firmware/DWC (incl. betas or self-compiled)
                  My Tool Collection

                  1 Reply Last reply Reply Quote 1
                  • dc42undefined
                    dc42 administrators @3dmntbighker
                    last edited by

                    @3dmntbighker said in Command to move/rename files:

                    This ties into my suggestion that files with "._" and ".DS_Store" should at the very least be hidden. For that matter any file that starts with a period should really be ignored. Anyone who frequently mounts the SD card in Windows or Mac will likely find these droppings all over the place. I'd be just as happy if the Duet deleted all of these files when the SD card is mounted, but I realize that's not likely to happen. I'm mostly referring these files appearing in the 12864 file list.

                    I am confused. RRF doesn't return files whose name begin with '.' to DWC. I have just tested this by uploading a menu file starting with '.' to a Maestro. It didn't appear in the file list after uploading it, even after pressing Refresh.

                    Duet WiFi hardware designer and firmware engineer
                    Please do not ask me for Duet support via PM or email, use the forum
                    http://www.escher3d.com, https://miscsolutions.wordpress.com

                    3dmntbighkerundefined 1 Reply Last reply Reply Quote 0
                    • wilrikerundefined
                      wilriker
                      last edited by

                      And here's the Pull Request.

                      Manuel
                      Duet 3 6HC (v0.6) with RPi 4B on a custom Cartesian
                      with probably always latest firmware/DWC (incl. betas or self-compiled)
                      My Tool Collection

                      1 Reply Last reply Reply Quote 0
                      • 3dmntbighkerundefined
                        3dmntbighker @dc42
                        last edited by

                        @dc42 said in Command to move/rename files:

                        @3dmntbighker said in Command to move/rename files:

                        This ties into my suggestion that files with "._" and ".DS_Store" should at the very least be hidden. For that matter any file that starts with a period should really be ignored. Anyone who frequently mounts the SD card in Windows or Mac will likely find these droppings all over the place. I'd be just as happy if the Duet deleted all of these files when the SD card is mounted, but I realize that's not likely to happen. I'm mostly referring these files appearing in the 12864 file list.

                        I am confused. RRF doesn't return files whose name begin with '.' to DWC. I have just tested this by uploading a menu file starting with '.' to a Maestro. It didn't appear in the file list after uploading it, even after pressing Refresh.

                        I was referring to what I see in the 12864 directory list. Not the web console. When you go to print from the 12864 menus there are a bunch of these files littered everywhere that Windows must have left at some point. But I use a Mac.

                        Scratch built CoreXY with Maestro
                        Heavily modified Ender 3 with Maestro
                        MPCNC work in progress with Duet WiFi

                        wilrikerundefined 1 Reply Last reply Reply Quote 0
                        • wilrikerundefined
                          wilriker @3dmntbighker
                          last edited by

                          @3dmntbighker said in Command to move/rename files:

                          a bunch of these files littered everywhere that Windows must have left at some point. But I use a Mac.

                          Just nitpicking: .DS_Store files are created by MacOS. 😉

                          Solution: use Linux. It won't add any unwanted files to your SD card. 😂

                          (Couldn't resist 😉 )

                          Manuel
                          Duet 3 6HC (v0.6) with RPi 4B on a custom Cartesian
                          with probably always latest firmware/DWC (incl. betas or self-compiled)
                          My Tool Collection

                          3dmntbighkerundefined 1 Reply Last reply Reply Quote 2
                          • 3dmntbighkerundefined
                            3dmntbighker @wilriker
                            last edited by

                            @wilriker said in Command to move/rename files:

                            @3dmntbighker said in Command to move/rename files:

                            a bunch of these files littered everywhere that Windows must have left at some point. But I use a Mac.

                            Just nitpicking: .DS_Store files are created by MacOS. 😉

                            Solution: use Linux. It won't add any unwanted files to your SD card. 😂

                            (Couldn't resist 😉 )

                            Hehe, I manage Linux systems for a living. But I use a Mac to get actual work done.

                            Scratch built CoreXY with Maestro
                            Heavily modified Ender 3 with Maestro
                            MPCNC work in progress with Duet WiFi

                            wilrikerundefined 1 Reply Last reply Reply Quote 0
                            • wilrikerundefined
                              wilriker @3dmntbighker
                              last edited by

                              @3dmntbighker Fair enough. I use Linux everywhere and wouldn't want it any other way. One of my professors once said to me it all boils down to what system fits best to your way of thinking and expectations. 🙂

                              Manuel
                              Duet 3 6HC (v0.6) with RPi 4B on a custom Cartesian
                              with probably always latest firmware/DWC (incl. betas or self-compiled)
                              My Tool Collection

                              deckingmanundefined 1 Reply Last reply Reply Quote 0
                              • deckingmanundefined
                                deckingman @wilriker
                                last edited by

                                @wilriker said in Command to move/rename files:

                                @3dmntbighker Fair enough. I use Linux everywhere and wouldn't want it any other way. One of my professors once said to me it all boils down to what system fits best to your way of thinking and expectations. 🙂

                                For me, that would mean a slide rule and log tables ☺

                                Ian
                                https://somei3deas.wordpress.com/
                                https://www.youtube.com/@deckingman

                                wilrikerundefined 1 Reply Last reply Reply Quote 0
                                • wilrikerundefined
                                  wilriker @deckingman
                                  last edited by

                                  @deckingman said in Command to move/rename files:

                                  For me, that would mean a slide rule and log tables ☺

                                  I guess that would restrict our future communication to traditional mail then. 😂

                                  Manuel
                                  Duet 3 6HC (v0.6) with RPi 4B on a custom Cartesian
                                  with probably always latest firmware/DWC (incl. betas or self-compiled)
                                  My Tool Collection

                                  deckingmanundefined 1 Reply Last reply Reply Quote 0
                                  • deckingmanundefined
                                    deckingman @wilriker
                                    last edited by

                                    @wilriker said in Command to move/rename files:

                                    @deckingman said in Command to move/rename files:

                                    For me, that would mean a slide rule and log tables ☺

                                    I guess that would restrict our future communication to traditional mail then. 😂

                                    Yes. Hand written with a quill, and sent by carrier pigeon.

                                    Ian
                                    https://somei3deas.wordpress.com/
                                    https://www.youtube.com/@deckingman

                                    wilrikerundefined dc42undefined 2 Replies Last reply Reply Quote 0
                                    • wilrikerundefined
                                      wilriker @deckingman
                                      last edited by

                                      @deckingman said in Command to move/rename files:

                                      Yes. Hand written with a quill, and sent by carrier pigeon.

                                      Don't forget about the sealing wax - we have to make sure it arrives properly unopened!

                                      Manuel
                                      Duet 3 6HC (v0.6) with RPi 4B on a custom Cartesian
                                      with probably always latest firmware/DWC (incl. betas or self-compiled)
                                      My Tool Collection

                                      3dmntbighkerundefined 1 Reply Last reply Reply Quote 0
                                      • 3dmntbighkerundefined
                                        3dmntbighker @wilriker
                                        last edited by

                                        @wilriker said in Command to move/rename files:

                                        @deckingman said in Command to move/rename files:

                                        Yes. Hand written with a quill, and sent by carrier pigeon.

                                        Don't forget about the sealing wax - we have to make sure it arrives properly unopened!

                                        Signed with a w.a.x. cert? 😉

                                        Scratch built CoreXY with Maestro
                                        Heavily modified Ender 3 with Maestro
                                        MPCNC work in progress with Duet WiFi

                                        1 Reply Last reply Reply Quote 0
                                        • dc42undefined
                                          dc42 administrators @deckingman
                                          last edited by

                                          @deckingman said in Command to move/rename files:

                                          @wilriker said in Command to move/rename files:

                                          @deckingman said in Command to move/rename files:

                                          For me, that would mean a slide rule and log tables ☺

                                          I guess that would restrict our future communication to traditional mail then. 😂

                                          Yes. Hand written with a quill, and sent by carrier pigeon.

                                          Two tin cans and a very long piece of string is faster 🙂

                                          Duet WiFi hardware designer and firmware engineer
                                          Please do not ask me for Duet support via PM or email, use the forum
                                          http://www.escher3d.com, https://miscsolutions.wordpress.com

                                          wilrikerundefined 1 Reply Last reply Reply Quote 0
                                          • wilrikerundefined
                                            wilriker @dc42
                                            last edited by

                                            @dc42 said in Command to move/rename files:

                                            Two tin cans and a very long piece of string is faster 🙂

                                            Now, you spawned the question in my head about how fast the information travels along the string... 🤦 Is it speed of sound? Or is whatever speed it really is actually the speed of sound? 😖

                                            Manuel
                                            Duet 3 6HC (v0.6) with RPi 4B on a custom Cartesian
                                            with probably always latest firmware/DWC (incl. betas or self-compiled)
                                            My Tool Collection

                                            gtj0undefined 1 Reply Last reply Reply Quote 0
                                            • First post
                                              Last post
                                            Unless otherwise noted, all forum content is licensed under CC-BY-SA