2088 posts
Location
South Africa
Posted 27 October 2012 - 11:18 PM
When ever I use the 'copy' program to a floppy disk within a computer terminal, like:
copy file disk/
It copies to the very last folder in the disk folder. How do I change which folder it goes to?
2005 posts
Posted 27 October 2012 - 11:24 PM
Are you rewriting copy or looking to use the existing version more effectively?
2088 posts
Location
South Africa
Posted 27 October 2012 - 11:28 PM
Making a program that just copies content from 1 disk to another. I just can't get the copy part right, everything else is fine :X
139 posts
Posted 27 October 2012 - 11:33 PM
are you basing it off the code i gave you? if you are then look at the loops I made to copy all the programs out of it but not copy the directory itself because you cannot overwrite the disk directory
139 posts
Posted 27 October 2012 - 11:37 PM
tocopy = fs.list("disk")
leng = #tocopy
at = 1
while leng > 0 do
helpful = "disk2/"..tocopy[at]
helpful2 = "disk/"..tocopy[at]
if fs.exists(helpful) then
at = at + 1
else
fs.copy(helpful2,helpful)
leng = leng - 1
at = at + 1
end
are the loops i am talking about
2088 posts
Location
South Africa
Posted 27 October 2012 - 11:38 PM
are you basing it off the code i gave you? if you are then look at the loops I made to copy all the programs out of it but not copy the directory itself because you cannot overwrite the disk directory
Yeah I saw, I tried copy file disk2/
Says access denied.