Page 2 of 2

Re: Problem downloading files from a website

Posted: Wed May 29, 2019 4:57 pm
by Hunam
Indeed they show me the LiveCode installation folder, but how do I change it to make it my download folder so?

Re: Problem downloading files from a website

Posted: Wed May 29, 2019 5:06 pm
by Klaus
You could ask the user/yourself where to put the file and use the result in your download handler:

Code: Select all

...
answer folder "Please select a folder to download the file to:"

## User/you clicked CANCEL:
if it = EMPTY then
  exit to top
end if

## The chosen folder is now in the variable IT
put it into tFolder

## Now you can use this to concatenate the correct filename for your downloaded file:
libURLDownloadToFile "ftp://username:password@ftpupload`.`net/htdocs/test-file.psd",(tFolder & "/test-file.psd"),"download_done"
...
And please check the link that bogs provided in his first answer.
Looks like I already gave a lot of related answers to this problem about 9 years ago. :-)

Re: Problem downloading files from a website

Posted: Wed May 29, 2019 5:13 pm
by Hunam
Thanks a lot, thanks for all of your help :wink: