Posted 24 September 2013 - 05:09 PM
HI!
To simplify the way i put programs on my turtles on the server I'm hosting, I made this setup based on
stuff i found in threads on this forum.
Mainly this thread: http://www.computerc...__fromsearch__1
My question is regarding this script i call "update"
Now i want this script to download this content to a folder instead of root and i don't quite know how to modify the update script to do so.
Any help would be awesome! :)/> Thanks!
To simplify the way i put programs on my turtles on the server I'm hosting, I made this setup based on
stuff i found in threads on this forum.
Mainly this thread: http://www.computerc...__fromsearch__1
My question is regarding this script i call "update"
print("Downloading updates from the Server")
local downloadPath = 'http://www.mywebserver.org/computercraft/'
local files = http.get('http://www.mywebserver.org/list.php')
local line = files.readLine()
while line do
local req = http.get(downloadPath..line)
local f = fs.open(line, 'w')
f.write(req.readAll())
req.close()
f.close()
line = files.readLine()
end
files.close()
print("Update complete")
Now i want this script to download this content to a folder instead of root and i don't quite know how to modify the update script to do so.
Any help would be awesome! :)/> Thanks!