This is a read-only snapshot of the ComputerCraft forums, taken in April 2020.
Spongy141's profile picture

How do you read a floppy disk.

Started by Spongy141, 19 March 2012 - 01:31 AM
Spongy141 #1
Posted 19 March 2012 - 02:31 AM
I've been experimenting with the floppy disks and have been trying to read them with one of my computers,
i tried making a program to open them, but it never works. Here is what i tried
EDIT: I added more code for better options but i still dont know the code on how to read the data on the floppy disk.

print("Opening...")
sleep(1)
print("Opening..")
sleep(1)
print("Opening.")
sleep(1)
term.write("Password?:")
if read("*") == ("BOB") then
print("Loading..")
sleep(5)
if disk.isPresent("bottom") then
if disk.hasData("bottom") then
print("DISK HAS DATA")
else
print("NO DISK OR HAS NO DATA")
end
end
end
it says bottom because that were my disk drive is. also i used the help and it said to do the "disk.hasData( side )".
Please help.
Casper7526 #2
Posted 19 March 2012 - 03:04 AM
That's just checking to see if there is a floppy in the drive. If you want to read data you need to check for the path of the side with a floppy then read the data from the file you would like. Work on your code a bit more and give us an updated snippet so we can help you further along when you yourself get further along.
Spongy141 #3
Posted 19 March 2012 - 03:08 AM
That's just checking to see if there is a floppy in the drive. If you want to read data you need to check for the path of the side with a floppy then read the data from the file you would like. Work on your code a bit more and give us an updated snippet so we can help you further along when you yourself get further along.
ok i will