Difference between revisions of "Copy"
From ComputerCraft Wiki
m |
Bomb Bloke (Talk | contribs) m (Category tag.) |
||
| (2 intermediate revisions by 2 users not shown) | |||
| Line 1: | Line 1: | ||
{{Stub|Needs more info about the program itself, perhaps an image?}} | {{Stub|Needs more info about the program itself, perhaps an image?}} | ||
| − | Copy is a [[CraftOS Shell|built in program for computers and turtles]] that will copy the specified source into the specified destination. If a different filename is specified, it will rename the copy as well. It will not create non-existant directories however. | + | Copy is a [[CraftOS Shell|built in program for computers and turtles]] that will copy the specified source path into the specified destination. If a different filename is specified, it will rename the copy as well. It will not create non-existant directories however. |
Note: This program can also be used with the linux-like command 'cp' | Note: This program can also be used with the linux-like command 'cp' | ||
| Line 8: | Line 8: | ||
|code=copy /foo /bar | |code=copy /foo /bar | ||
}} | }} | ||
| + | |||
| + | As of CC 1.6, this program also utilizes the [[fs.find]] function to work with the '*' wildcard. | ||
| + | |||
| + | {{Example | ||
| + | |desc=Copies all files in folder 'foo' to folder 'bar' | ||
| + | |code=copy foo/* bar | ||
| + | }} | ||
| + | {{Example | ||
| + | |desc=Copies all files starting with the letter "a" from 'foo' to 'bar' | ||
| + | |code=copy foo/a* bar | ||
| + | }} | ||
| + | |||
| + | [[Category:Programs]] | ||
Latest revision as of 09:36, 17 June 2014
| This page is a stub. Please help us by expanding it.
|
Copy is a built in program for computers and turtles that will copy the specified source path into the specified destination. If a different filename is specified, it will rename the copy as well. It will not create non-existant directories however.
Note: This program can also be used with the linux-like command 'cp'
| Copies /foo to /bar | |
| Code |
copy /foo /bar |
As of CC 1.6, this program also utilizes the fs.find function to work with the '*' wildcard.
| Copies all files in folder 'foo' to folder 'bar' | |
| Code |
copy foo/* bar |
| Copies all files starting with the letter "a" from 'foo' to 'bar' | |
| Code |
copy foo/a* bar |