Link to home
Start Free TrialLog in
Avatar of juricta
jurictaFlag for United States of America

asked on

How to FTP multiple file at one time

I have some code in VBA (Access) (attached).  It takes info and then opens FTP connection then DOWNLOADS a file. If I want to DOWNLAOD multiple files I have to do them one-at-a-time which is time consuming.  I need to see if anyone can help me make the code DOWNLOAD MULTIPLE files at one time.  Also, I need to create a file that shows the results of the FTP sorted by File and Status (download/not download) as well as any other FTP information available.

I have the same issue with UPLOADING files but that is for another time.

Thanks in advance for the help.
FTP-Download-Issue.docx
Avatar of Shaun Vermaak
Shaun Vermaak
Flag of Australia image

FTP servers generally limit the number of connections. Just zip the data on the source, transfer the zip to the destination, the unzip on destination.

Here is link to 7z in VBA solution
https://www.experts-exchange.com/questions/29021073/Getting-the-7Z-zip-dll-to-work-with-MS-Access.html?searchSuccess=true&searchTop10=true
Avatar of juricta

ASKER

I will try the link you gave.  Unfortunately, the OLCC server allows only individual files to be uploaded.  I am not authorized to login to the server and unzip files.  I can only upload and download.  I'll get back to you on the link.

thanks
Avatar of juricta

ASKER

The link proviced will not Upload/Download file.  So It does not help me.  Thanks anyway!
The link provided is just to use 7z in VBA
I have never seen or heard of any FTP application that could download or upload multiple files in parallel.  And even though browsers supposedly download multiple files in parallel, that is a little misleading.  You still have only one network connection and they are time sharing it to do 'multiple' downloads.  They are not really in parallel.  Though it could be faster than FTP because regular FTP is a fairly slow process.
Avatar of juricta

ASKER

The current process has one connection.  Download Files1 LOOP download Files2 LOOP download File3.  I have the code that will download one file but cannot figure out how to do the LOOP
Avatar of juricta

ASKER

the file are not done in parallel (or maybe I do not understand).  There should be a way to connect to the ftp site the create a LOOP for the 3 files to PUT them or GET them, then close the ftp site?
You can use a script with WinSCP https://winscp.net/eng/download.php

option batch abort 
option confirm off 
open sftp://XXXXX
lcd "C:\TEMP" 
option transfer ascii 
get *SomeFileFilter*
exit 

Open in new window

Avatar of juricta

ASKER

Can you please explain your code?

option batch abort
option confirm off
open sftp://XXXXX
lcd "C:\TEMP"
option transfer ascii
get *SomeFileFilter*
exit
ASKER CERTIFIED SOLUTION
Avatar of Shaun Vermaak
Shaun Vermaak
Flag of Australia image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial