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

fs.copy. access denied! why?

Started by H4X0RZ, 20 June 2013 - 08:29 AM
H4X0RZ #1
Posted 20 June 2013 - 10:29 AM
Hello folks,
I'm working on a little "Disk manager, called
D-Burn.

Now I want to copy files from the computer to the disk.
Actually I have this code copying it.

fs.copy(fileMenu, burnDrive.getMountPath())
--[[
declaration of the variables:
fileMenu is a variable that contains the output of a menu function. The output is the menu item as a string.

burnDrive is my wrapped disk drive.
]]--

But it allways return "D-Burn:187: Access denied"
Whats wrong?
Xenon #2
Posted 20 June 2013 - 10:32 AM
The copy destination has to end with the file name.
Say you wanted to copy a file called "readme". You would then do: fs.copy("readme", "disk/readme")

You're welcome!
H4X0RZ #3
Posted 20 June 2013 - 10:36 AM
Thank you so much!