Post a reply

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: Script and parallel running

PrzemekK wrote:

Is it a problem when two different instances upload the same file at the same time to different servers?

No. This is not what this thread was about. It was about parallel uploads to the same server.

Actually I have an issue with this scenario. After I run such test, the parent process (cmd.exe) is not able to execute any .bat files afterwards.

Start a new thread and provide some details.
PrzemekK

Re: Script and parallel running

martin wrote:

There should be no problem at all running multiple scripts in parallel (unless different instances try to upload the same file).

Other than that I do not understand your problem description. Can you share your script and a log file showing the problem? Also make sure each instance of the script write to a distinct log file.


Hi Martin,
what did you mean by

martin wrote:

unless different instances try to upload the same file
?
Is it a problem when two different instances upload the same file at the same time to different servers?
Actually I have an issue with this scenario. After I run such test, the parent process (cmd.exe) is not able to execute any .bat files afterwards.
iZ

After taking a deep look I have seen that the problem was that the files were overwritten because the dates on the filenames were also the same.

How can I manage a "dynamic" filename generator?? The original filename is not an option. There is a possibility to use a "Global Counter" for the file names?
martin

Re: Script and parallel running

There should be no problem at all running multiple scripts in parallel (unless different instances try to upload the same file).

Other than that I do not understand your problem description. Can you share your script and a log file showing the problem? Also make sure each instance of the script write to a distinct log file.
iZ

Script and parallel running

I´m having the following problem,

I have an "external" program which calls a .bat file (which generate and execute the WinSCP Script) for each file received by this external program.

The problem is the following,

If the external program receives, for example, 6 files at the same time... it calls 6 times the .bat file at the same time too. Then we have 6 .bat running parallel creating one Script, the same Script for the 6, and executing this Script 6 times... causing "random missing tranfers" (or that is what I think...)

I have tryed different ways to generate the name of each Script, but I saw on the .log file that the WinSCP commands are executed ones between the oders.... and for example:

   Script1                         Script2

1  Open XXXX                      Open XXXX
2  Transfer XXXXX
3  Transfer XXXXX
4                               Transfer XXXXX
5  Close                        Transfer XXXXX           <---- Not transfered
6                               Transfer XXXXX           <---- Not transfered     
.
.
.


Could someone please give a solution for this problem? I can´t find anything....

Thanks!!!