Jump to content




[LUA] [HELP] How to programatically copy a file from disk to root directory of console


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

#1 Quinncunx

  • New Members
  • 9 posts

Posted 16 June 2012 - 11:59 PM

Effectively I am trying to make an installer/uninstaller for a program, how do I programatically copy a file from the disk to the root directory of the console. I was thinking this

[CODE]
fs.copy("file", ".. /file")
[/CODE

however it is telling me Invalid path, though if I was to type that as a shell command it would work.

So I am a bit confused.

#2 tfoote

  • New Members
  • 134 posts
  • LocationSalt Lake, UT

Posted 17 June 2012 - 01:02 AM

I have tried to copy things to the rom... It doesn't let you do it... As long as you copy them not to the rom you will be fine...

fs.copy("file", "/file") -- That should work... Let me know otherwise


#3 MysticT

    Lua Wizard

  • Members
  • 1,597 posts

Posted 17 June 2012 - 01:03 AM

The paths given to fs.copy (and any fs function) must be absolute. So you have to do: fs.copy("disk/file", "file")





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users