Post a reply

Before posting, please read how to report bug or request support effectively.

Bug reports without an attached log file are usually useless.

Options
Add an Attachment

If you do not want to add an Attachment to your Post, please leave the Fields blank.

(maximum 10 MB; please compress large files; only common media, archive, text and programming file formats are allowed)

Options

Topic review

martin

Re: Uploading multiple files with script

Ulrike wrote:

im uploading multiple files via script to one SFTP server. Each file is done with one script. After uploading 5 files (running 5 scripts) the login to the server is not possible for the next 2 or 3 minutes.

It seems like you have some connection limit set on your server.
Ulrike

Uploading multiple files with script

Hi,

thanks for the reply.

The reason for uploading the files one by one is to make sure that every and each file suceeded. Im writing the script for the upload from code. And I can only get the return code from the whole script (as far as I know). As there are multiple formats files in multiple destinations wildcards wont work. :(

Any suggestions? Is this a known behaviour?

Regards,

Ulrike
RickB

Re: Uploading multiple files with script

Ulrike wrote:

Hi,

im uploading multiple files via script to one SFTP server. Each file is done with one script. After uploading 5 files (running 5 scripts) the login to the server is not possible for the next 2 or 3 minutes.

<--- SNIP
option batch on
option confirm off
open sftp://<user>:<pw>@<ip>:<port>
session
option transfer binary
put <file>
exit
--> SNAP

Any suggestions?

Regards,

Ulrike


The simplest (but not most elegant) solution is to list all files in the one script:

option batch on
option confirm off
open sftp://<user>:<pw>@<ip>:<port>
session
option transfer binary
put <file1>
put <file2>
put <file3>
put <file4>
put <file5>
put <file6>
put <file7>
exit

But why don't you use a wildcard instead? For example, if all the files you are uploading share the same extension (for example .txt) you could do this:

put *.txt

There are other examples here:
https://winscp.net/eng/docs/scriptcommand_put
Ulrike

Uploading multiple files with script

Hi,

im uploading multiple files via script to one SFTP server. Each file is done with one script. After uploading 5 files (running 5 scripts) the login to the server is not possible for the next 2 or 3 minutes.

<--- SNIP
option batch on
option confirm off
open sftp://<user>:<pw>@<ip>:<port>
session
option transfer binary
put <file>
exit
--> SNAP

Any suggestions?

Regards,

Ulrike