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

Guest

Thanks for your answer but the problem is that I don't know the script to play in advance.
The scripts are generated dynamically by the actions of the users on another application.

I see the first WinScp session in the taskbar (if I don't use exit on my script), isn't it possible to call this session?

Something like WinScp.exe /useAlreadyOpenedConnexion 1 /console /command /script=C:\Test\next_command.txt
martin

Re: Use opened session with different scripts

You have to merge the scripts into one and make the script pause somehow between the two phases.
You can try something like "call sleep 5m" (if you use SFTP/SCP).
See https://winscp.net/eng/docs/scriptcommand_call
Nephtis

Use opened session with different scripts

Hi,

I'm facing some problem to use an opened session on an unix server. We use a securID so the password changes every minute.

How is it possible to run several scripts for the same session but not at the same time?


For exemple :

Batch file :
Test_sending.bat
WinScp.exe MyUnixServer /console /command /script=C:\Test\send_file_1.txt

Scripts files :
send_file_1.txt :
option transfer binary
put C:\Test\my_file_1.txt /home/test/my_file_1.txt

send_file_2.txt :
option transfer binary
put C:\Test\my_file_2.txt /home/test/my_file_2.txt

Batch file is run (enters for the first time the password) and some minutes later we have to run the second script file. How to use the first session opened?