Hi, I have a command like this in my script:
DownloadFile("http://internet.com/" ..
"Hello.jpg", {File = "Hello.jpg"})
It downloads the given file to the same folder where the script is located. The behaviour is the same on Windows and macOS.
However, if I compile a standalone executable, while Windows .exe still downloads it to the same folder, macOS app downloads it to itself: App > Contents > Resources
How can I download it to the same folder where the app itself is located? Or elsewhere?
Many thanks.
DownloadFile on macOS
- airsoftsoftwair
- Posts: 5443
- Joined: Fri Feb 12, 2010 2:33 pm
- Location: Germany
- Contact:
Re: DownloadFile on macOS
You just have to pass the path along the file name in the "File" tag, e.g.
Code: Select all
DownloadFile("http://internet.com/" .. "Hello.jpg", {File = "/Applications/Hello.jpg"})