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

Andres Ayala via curl-users <[email protected]>
Newsgroups gmane.comp.web.curl.general
Message-ID <BEZP281MB25364DD3AF023C92EE5A9041F8232@BEZP281MB2536.DEUP281.PROD.OUTLOOK.COM>
> 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.

Knowing it is not repeating the connection I will use '--next' to split the blocks and just repeat the options that are not global.

Thanks!
Andrés Ayala

-----Original Message-----
From: Daniel Stenberg <[email protected]>
Sent: Monday, March 4, 2024 11:11 AM
To: Andres Ayala via curl-users <[email protected]>
Cc: Andres Ayala <[email protected]>
Subject: Re: Uploading many files to FTP/SFTP using a temporal name

WARNING: This email originated outside the organisation. Treat links and attachments with caution.


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

Any email message from EUMETSAT is sent in good faith but shall neither be binding nor construed as constituting a commitment by EUMETSAT, except where provided for in a written agreement or contract or if explicitly stated in the email. Please note that any views or opinions presented in this email are solely those of the sender and do not necessarily represent those of EUMETSAT. This message and any attachments are intended for the sole use of the addressee(s) and may contain confidential and privileged information. Any unauthorised use, disclosure, dissemination or distribution (in whole or in part) of its contents is not permitted. If you received this message in error, please notify the sender and delete it from your system.
-- 
Unsubscribe: https://lists.haxx.se/mailman/listinfo/curl-users
Etiquette:   https://curl.se/mail/etiquette.html
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.