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

Copy file to floppy

Started by niels22, 07 July 2012 - 01:26 PM
niels22 #1
Posted 07 July 2012 - 03:26 PM
How will I do this?

fs.copy("myfile","disk")
just says acess denied.
KevinW1998 #2
Posted 07 July 2012 - 03:34 PM
This happens if you edit a file and don't close it proply!

e.g.

h = fs.open("filename","a")
h.writeLine("something")
-- you forget to close the file using h.close()

or the file wasn't close properly because of an error
niels22 #3
Posted 07 July 2012 - 03:38 PM
What i'm trying to is copy a program stored on the computer onto a floppy, without having to write it again.
KevinW1998 #4
Posted 07 July 2012 - 03:43 PM
oh wait a sek! Try this:
fs.copy("myfile","disk/myfile")

or if it doesn't work try:
shell.run("copy","myfile","disk/myfile")
inventor2514 #5
Posted 07 July 2012 - 03:44 PM
Try fs.copy("filename","disk/filename").
Rasip #6
Posted 08 July 2012 - 09:06 AM
i'm having a similar problem. no matter what i try i get access denied or it just makes a copy named disk of the file i'm trying to transfer.
disk.isPresent admits there is a disk but ls doesn't see one. do i have to mount the drive in some way?
KevinW1998 #7
Posted 08 July 2012 - 06:17 PM
If a disk is inserted in the disk-drive her must be a folder called 'disk' otherwise I don't know