First I want to know how to make a simple Stripmine which digs 2 blocks high and 1 block thick.
Like if you type in the turtle:
turtle.dig()
turtle.forward()
turtle.digUp()
And this for 50blocks.
Second question: Can I clear a floppy?
If yes. How can i clear it?
Simple Stripmine / Clear a floppy disk
Started by PiiNGPooNG, Mar 02 2013 09:38 AM
4 replies to this topic
#1
Posted 02 March 2013 - 09:38 AM
#2
Posted 02 March 2013 - 10:55 AM
Split into new topic.
Delete the contents of the floppy and clear its label.
for i = 1, 50 do turtle.dig() turtle.forward() turtle.digUp() end
Delete the contents of the floppy and clear its label.
#3
Posted 02 March 2013 - 11:19 AM
But how do I delete the contents?
#4
Posted 02 March 2013 - 11:25 AM
PiiNGPooNG, on 02 March 2013 - 11:19 AM, said:
But how do I delete the contents?
From the shell, type "cd /disk" to navigate to the disk directory. Type "ls" to see all the files, and type "rm [program]" to remove programs you want. Type label to see all arguments (including a way to unlabel a disk).
In a program, an easy way to delete the entire contents of a directory would be to do something like the following:
for i,v in pairs(fs.list("/disk")) do
fs.delete(fs.combine("/disk/", v))
end
#5
Posted 02 March 2013 - 11:26 AM
Manually, you can use the delete program (or its alias rm); automatically, you could use fs.list and fs.delete:
for _, file in pairs(fs.list("/disk")) do
fs.delete("/disk/"..file)
end
2 user(s) are reading this topic
0 members, 2 guests, 0 anonymous users











