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: How to open multiple sessions in CMD?

The way you open the sessions would actually open them in existing WinSCP window, was the window idle. But as you open them quickly one after another, they open separately, as the window is probably still busy opening the previous session. If you put a delay in your loop, it should do.
timeout /T 5
nx_massix

How to open multiple sessions in CMD?

Hi,
I wanted to create a small BAT-Script that opens multiple WinSCP-Sessions with IPs from a txt-file.
I already got to the point where it opens multiple WinSCP windows, but I just want one window with multiple Sessions.

My script so far:
set indexSystems=0
set indexKeys=0
 
for /F "usebackq delims=" %%a in ("C:\IP.txt") do (
    set /a indexSystems+=1
    set systems[!indexSystems!]=%%a
)
 
for /L %%i in (1,1,%indexSystems%) do (
 
   Start /B WinSCP.exe sftp://root:admin@!systems[%%i]!
   
)
 
pause

Is there a way to open them in just one window?
br Markus