curl / Mailing Lists / curl-users / Single Mail
Buy commercial curl support from WolfSSL. We help you work out your issues, debug your libcurl applications, use the API, port to new platforms, add new features and more. With a team lead by the curl founder himself.

Re: Uploading many files to FTP/SFTP using a temporal name

From: Daniel Stenberg via curl-users <curl-users_at_lists.haxx.se>
Date: Mon, 4 Mar 2024 11:10:55 +0100 (CET)

On Mon, 4 Mar 2024, Andres Ayala via curl-users wrote:

> The problem is when we try to upload two files:

> quote = "-RNFR target/folder/file_0.txt.tmp"
> quote = "-RNTO target/folder/file_0.txt"

Right, because the --quote option is appending to a list of commands and that
list is sent for each URL.

> I tried to use the "--next" option but it seems it reconnect each time to
> the FTP server (at least we need to give again the user credentials)

It should not reconnect if you specify the same credentials for the second
transfer. But yes, you need to provide the credentials again because they are
reset to default at --next.

> How I can do that curl applies the quotes only to the last defined url?

There is no such special option. We provide --next.

-- 
  / daniel.haxx.se
  | Commercial curl support up to 24x7 is available!
  | Private help, bug fixes, support, ports, new features
  | https://curl.se/support.html
-- 
Unsubscribe: https://lists.haxx.se/mailman/listinfo/curl-users
Etiquette:   https://curl.se/mail/etiquette.html
Received on 2024-03-04