Downloads a file from a server

Hello !

I need a code for desktop application where the application downloads a file from a server and puts it in a certain folder, without Windows or Mac, any help is welcome.

Tanks.

look up CURL

Hello Dave,

         CURL is a Plugin ?

cURL is part of the MBS plugins (not that I am advocating those)
because it can all be done with native Xojo code as well…
Search this forum… a while back I posted a cURL class for free… I will see if I can find it again


here are the functions my class has
I will post the code, and update this topic with a link to it

// to return a directory
cURL -s -S -u <username>:<password> FTP://www.myserver.com"

// to download a file
//cURL -s -S -u <username>:<password> FTP://www.myserver.com -o "+chr(34)+"<remotefilename>"+chr(34)

// to upload a file
//cURL -s -S -u <username>:<password> FTP://www.myserver.com -T "+chr(34)+"<localfilename>"+chr(34)

// to Make a Directory
//cURL -s -S -u <username>:<password> FTP://www.myserver.com -Q &apos;MKD <newname>&apos;

// to Remove a Directory
//cURL -s -S -u <username>:<password> FTP://www.myserver.com -Q &apos;RMD <dirname>&apos;

// to Remove a File
//cURL -s -S -u <username>:<password> FTP://www.myserver.com -Q &apos;DELE <filename>&apos;

// to Change File Permissons [UNIX ONLY]
//cURL -s -S -u <username>:<password> FTP://www.myserver.com -Q &apos;SITE CHMOD  <permission> <filename>&apos;"

// to Rename a File
cURL -s -S -u <username>:<password> FTP://www.myserver.com -Q &apos;RNFR <oldname>&apos; -Q &apos;RNTO <newname>&apos;

Tanks Dave !

cURL code
This code is fairly “old” (pre-Xojo), but it should still work just fine with current version of Xojo.
The zip file contains examples, its up to you to adapt them to you specific requirements

[quote=300807:@Dave S]cURL code
This code is fairly “old” (pre-Xojo), but it should still work just fine with current version of Xojo.
The zip file contains examples, its up to you to adapt them to you specific requirements[/quote]

Thank you very much Dave for wasting your time to help me.
I’ll analyze and then post here if it worked for my project.

it would only be a WASTE of my time, if you blew off the code without consideration :slight_smile:

I would never do that, thanks again!