Put multiple parallel files
Hi. I'm putting my files by bat script to my websites (it's like updating plugins files). All files are the same for all websites. It looks like this now:
Is it possible to speed it up? Now it's sending file by file, session by session and it take quite long time. Is there some option to send the same file to multiple destination at once? Or maybe some parallel files sending?
FOR %%A IN (.) DO ( set loc=%%~dpA set dir=%%~nA ) set file=%~n1 "C:\Program Files (x86)\WinSCP\winscp.com" /log=winscp.log /ini=nul /command ^ "open sftp://website1:password1@server1.com:2233 -hostkey=*" ^ "cd /home/server1/public_html/updated-content" ^ "put %loc%%dir%\%file%" ^ "open sftp://website2:password2@server2.com:2233 -hostkey=*" ^ "cd /home/server2/public_html/updated-content" ^ "put %loc%%dir%\%file%" ^ "open sftp://website3:password3@server3.com:2233 -hostkey=*" ^ "cd /home/server3/public_html/updated-content" ^ "put %loc%%dir%\%file%" ^ "open sftp://website4:password4@server4.com:2233 -hostkey=*" ^ "cd /home/server4/public_html/updated-content" ^ "put %loc%%dir%\%file%" ^ "open sftp://website5:password5@server5.com:2233 -hostkey=*" ^ "cd /home/server5/public_html/updated-content" ^ "put %loc%%dir%\%file%" ^ "open sftp://website6:password6@server6.com:2233 -hostkey=*" ^ "cd /home/server6/public_html/updated-content" ^ "put %loc%%dir%\%file%" ^ "exit"