Sending multiple files through FTPClient_Campbellsci论坛问答

Is it possible to configure the FTPClient command to send more than one file at a time? In other words, can I give it an array of file names to transmit? If so, how would I structure said command?

Thanks,
Chris

Sending multiple files through FTPClient_Campbellsci论坛问答

新对话如下:

In doing some testing, it does not look like the FTPClient supports multiple files, but I will double-check with the developers to make sure there's not a command of which I am unaware.

Regards,

Dana

新对话如下:

I double-checked and the FTPClient cannot send multiple files, though this is something we can consider for future OS versions.

The developer did suggest processing the files using a loop:

dim i
dim Files(3) as String * 64 =
{"USR:File1.dat","USR:File2.dat","USR:File3.dat"}

for i = 1 to 3
FTPClient(...,Files(i) )
next i

The syntax I highlighted above is fairly new (implemented in the most recent OSes); i.e., the ability to initialize a variable when declared. If your file name is dynamic, then you would use some other technique to populate the Files() array.

Regards,

Dana

新对话如下:

dim Files(3) as String * 64 = {"USR:File1.dat","USR:File2.dat","USR:File3.dat"}


Note that this needs to be all on one line. Word-wrap caused the initialization strings to move to the next line.

:) Dana

新对话如下:

Dana,

Thanks for the reply! We are already using a loop to send the files. The problem we have run into is the time per file (20-30 seconds). It appears to be an issue with the handshaking that occurs per file transfer rather than the size of the file since files sizes vary by as much as 100x, while connection times vary by only 1x.

So if we can't send multiple files per connection, are there other settings available to us to fine tune the FTPClient connection handshaking?

Chris

新对话如下:

The only advice I can offer is to run the FTPClient in a SlowSequence, so it is not holding up the main program execution.

Regards, Dana

新对话如下:

Ahhhh. Reverse DNS lookups timing out can cause all kinds of problems :>. We are down to 22 seconds to transfer 16 files that were taking close to 5.5 minutes. Life is better. Consider this thread closed and thanks!

分享到:

原文链接:,转发请注明来源!
海洋仪器网 仪器使用 Sending multiple files through FTPClient_Campbellsci论坛问答
「Sending multiple files through FTPClient_Campbellsci论坛问答」评论列表

发表评论