Jump to content




Need to code to copy a file from disk.


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

#1 SNWLeader

  • Members
  • 71 posts
  • LocationTampa Bay, Florida

Posted 10 October 2012 - 02:53 AM

I wanted to know how could I copy a file from a disk to the computer so this way all I have to do is put the disk in the diskdrive and the file would copy into the computer.

i am trying to get it so I can have bosschat on a disk the disk would copy it to the computer.

I just need it to copy the file. thanks

#2 Luanub

    Lua Nub

  • Members
  • 1,135 posts
  • LocationPortland OR

Posted 10 October 2012 - 02:54 AM

You'll want to use the fs API. Here is the syntax for the file copy. You can add an if statement or whatever you need to it.

fs.copy("disk/programName", "filePath/programName")


#3 SNWLeader

  • Members
  • 71 posts
  • LocationTampa Bay, Florida

Posted 10 October 2012 - 02:55 AM

o.k thank you. now lets see if this will work.

#4 Fatal_Exception

  • New Members
  • 105 posts

Posted 10 October 2012 - 02:56 AM

The FS API contains functions for working with files.

#5 SNWLeader

  • Members
  • 71 posts
  • LocationTampa Bay, Florida

Posted 11 October 2012 - 12:58 AM

I cannot get this to work.....I need to figure out how to get the paths correct. I am trying to get the file from the disk to the computer and it keeps telling me no such file. Can you give me an example or something.

#6 Lyqyd

    Lua Liquidator

  • Moderators
  • 8,465 posts

Posted 11 October 2012 - 01:06 AM

He posted an example above.





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users