Jump to content




[Disk help] Copying files to disk


  • You cannot reply to this topic
5 replies to this topic

#1 remiX

  • Members
  • 2,076 posts
  • LocationSouth Africa

Posted 27 October 2012 - 10: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?

#2 ChunLing

  • Members
  • 2,027 posts

Posted 27 October 2012 - 10:24 PM

Are you rewriting copy or looking to use the existing version more effectively?

#3 remiX

  • Members
  • 2,076 posts
  • LocationSouth Africa

Posted 27 October 2012 - 10: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

#4 tom2018

  • Members
  • 135 posts

Posted 27 October 2012 - 10: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

#5 tom2018

  • Members
  • 135 posts

Posted 27 October 2012 - 10: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

#6 remiX

  • Members
  • 2,076 posts
  • LocationSouth Africa

Posted 27 October 2012 - 10:38 PM

View Posttom2018, on 27 October 2012 - 10:33 PM, said:

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.





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users