Command to move/rename files
-
Will it support renaming folders too?
-
@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.
-
@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.
-
I reserved
M470
for creating a directory andM471
for moving/renaming files/directories. PR with implementation somewhen later today. -
@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.
-
And here's the Pull Request.
-
@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.
-
@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 )
-
@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.
-
@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.
-
@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
-
@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.
-
@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.
-
@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!
-
@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?
-
@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
-
@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?
-
@wilriker said in Command to move/rename files:
@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?
It's the speed of string of course.
-
NVP (Nominal Velocity of Propagation) for various substances (where C = Speed of Light in a Vacuum)
Electrical signal, open wire "ladder": 95-99% C Electrical signal, coax: 90 to 93% C Electrical signal, Cat3: 58.5% C Electrical signal, Cat6: 65% C Electrical signal, Cat7: 74 to 79% C Optical signal, fiber: 67% C
Sound waves on String: HIGHLY dependent on string composition and tension. Given by:
Where Ft is the tension and U is the mass per unit length of string. (SI units)
Example: High E string on a Guitar has a density of 3.09 x 10−4 kg/m, and a tension of about 56.40 N when properly tuned. The above forumula yields about 427.23 m/s.
.
Therefore, we can conclude: Use really thin string, and hold it very very tightly, so that the plucked string between the cans sounds like a guitar High E, then NVP:
String, thin and tight 0.0001424 % C
-
@danal I knew someone would come up with the answer to this question. Great!