Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- print("Enter url to download from:")
- local url = read()
- print("Enter filename to save to:")
- local name = read()
- print("Downloading...")
- local request, err = http.get(url)
- local contents = request.readAll()
- request.close()
- print("Saving to file...")
- local file = fs.open(name, "w")
- file.write(contents)
- file.close()
- print("Done.")
Add Comment
Please, Sign In to add comment