This is a read-only snapshot of the ComputerCraft forums, taken in April 2020.
CRUGG's profile picture

Download a file.

Started by CRUGG, 26 March 2018 - 03:33 PM
CRUGG #1
Posted 26 March 2018 - 05:33 PM
How do I code it that a script downloads for e.g. the file on http://myco.oldoma.in/cc/files/myprogram to /usr/bin/ on the ComputerCraft PC.

Don't tell me 'shell.run("wget …")' as the script should be compatible with 1.7.10 too.
RR_DEADPOOL #2
Posted 06 April 2018 - 01:25 PM
upload it to pastebin and take the random bits that will look like "6dn2x83" and do "pastebin get 6dn2x83 <filename> so…

pastebin get 6dn2x83 testfile

that 7digit code is just random btw
Luca_S #3
Posted 06 April 2018 - 06:44 PM
It might be helpful for you to take a look at the source of wget.