Topic "Synchronistaion hangs the program"

Author Message
Patryk

Guest


Hello

While synchronisation is finished, WinSCP stop to work and display "winscp>". Cursor blinks. All fichier and folders are send. But script doesn't make other commands.

Batch file:

Code:
@echo off

"C:\Program Files (x86)\WinSCP\WinSCP.com" ^
  /log="C:\xampp\htdocs\WinSCP.log" /ini=nul ^
  /command ^
    "open sftp://xxx@xxx/ -privatekey=C:\Users\xxx\.ssh\id_rsa.ppk -hostkey=""ssh-rsa 2048 xxx""" ^
   "synchronize remote C:\xampp\htdocs\pre-prod-git\test\ /home/xxx/dev/test/"
   "synchronize remote C:\xampp\htdocs\pre-prod-git\xxx\ /home/xxx/dev/xxx/"
    "put C:\xampp\htdocs\pre-prod-git\test.txt /home/xxx/dev/wxxx/" ^
    "put C:\xampp\htdocs\pre-prod-git\test2.txt /home/xxx/dev/xxx/" ^
    "exit"

set WINSCP_RESULT=%ERRORLEVEL%
if %WINSCP_RESULT% equ 0 (
  echo Success
) else (
  echo Error
)
WinSCP.log (15.1 KB) [Download]

Description: Log "censored" :)

Sans titre.png (28.84 KB) [Download]

Description: Scrren-shot of console

martin◆
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 27058
Location: Prague, Czechia
Your problem has nothing to do with WinSCP.
Your batch file syntax is wrong.
You are missing ^ after the lines with synchronize commands.
Patryk

Guest


Indeed
Thanks

Patryk
Advertisements

You can post new topics in this forum

Search

What is WinSCP?

It is award-winning SFTP client, SCP client, FTPS client and FTP client integrated into one software program for file transfer to FTP server or secure SFTP server. [More]

And it's free!

Donate

About donations

$9   $19   $49   $99

About donations

Recommend

WinSCP Privacy Policy

WinSCP License