Beginner-level help with Synapse multi-file FTP download needed, please lazarus / 38-Networking and Web Programming ---------------------------------------------------------------------- Albion123 · 2013-03-25 17:44 With the absolutely invaluable information I found on this Forum and others on the Internet, I have managed to write a Windows application in Lazarus which downloads files over a VPN from an FTP server and then deletes them from that server. However, the names of the files and, indeed, whether or not they exist, are not known in advance.  I have therefore been shelling out to the Windows Command Prompt in order to use the built-in command- line FTP.EXE and its scripting facilities.  This enables me to use wildcards with the "mget" and "mdel" commands, which achieves the desired result. The problem is that this technique constantly grabs focus every time a new Command Prompt is opened, which effectively renders the PC useless for other tasks until the application has finished.  It also seems slow, although this would not matter at all if the PC could be used for other purposes at the same time. I have tried to use the very highly-regarded Ararat Synapse, but in spite of the demonstration applications provided with it I am unable to do more than download a single file with a known name. I believe that the following sequence of operations is necessary: 1) Connect to the FTP Server 2) When prompted by the FTP Server, provide a login name and password 3) List the available files 4) Download each of the required files in the list, one at a time 5) Log off and close the connection Unfortunately, I am quite unable to find a simple example of the code which would achieve this.  The only examples I have found are designed for a level of ability and knowledge far in excess of mine.      The example at http://wiki.freepascal.org/Synapse uses "ftpGetFile" and this works well for a single file whose name is known in advance, but it has no provision for wildcards. Is anyone able to point me in the right direction for basic, simple code which would perform the tasks at Steps 1 - 3 above, please? ---------------------------------------------------------------------- taazz · 2013-03-25 18:28 well you can always ctrl+click the FtpGetFile and see what it is doing inside there to download the file also at the synapse home page there are a few extra samples including a ftpdemo http://synapse.ararat.cz/files/contrib/ftpdemo.zip ---------------------------------------------------------------------- BigChimp · 2013-03-26 08:29 What taazz said. Looking through Synapse's ftpsend.pas, the List function sounds interesting...