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 fix the logging can you please suggest me

Once again:
The C:\writable\path\to\log\WinSCP.log is a place holder, you need to replace it with some valid path.
maheshbabup777@gmail.com

how to fix the logging can you please suggest me

please help how to logging
martin

Re: My script is not getting executed, it is getting connected and starting the session and getting

Fix the logging and attach the log please.
maheshbabup777@gmail.com

My script is not getting executed, it is getting connected and starting the session and getting

@echo off
 
"C:\Program Files (x86)\WinSCP\WinSCP.com" ^
  /log="C:\writable\path\to\log\WinSCP.log" /ini=nul ^
  /command ^
    "open sftp://root:ikea%%40123@10.11.97.171/ -hostkey=""ssh-ed25519 256 2bK9x/+PkrDrpa6xfu+556yQUXDU7Za7T+Tm91mC4/s=""" ^
    "synchronize local C:\users\device-1\syncfiles /opt/syncfiles" ^
     "exit"
 
set WINSCP_RESULT=%ERRORLEVEL%
if %WINSCP_RESULT% equ 0 (
  echo Success
) else (
  echo Error
)
 
exit /b %WINSCP_RESULT%
maheshbabup777@gmail.com

getting error like synchronize is not an external or internal command

i can able to login but getting an error like synchronize is not an external or internal command
martin

Re: getting error while using this script file name, directory name or volume label syntax is incorrect

The C:\writable\path\to\log\WinSCP.log is a place holder, you need to replace it with some valid path.

The local|remote|both indicates that you need to select one of the tree options.

If this does not help, please attach a full session log file showing the problem (using the latest version of WinSCP).

To generate the session log file, use /log=C:\path\to\winscp.log command-line argument. Submit the log with your post as an attachment. Note that passwords and passphrases not stored in the log. You may want to remove other data you consider sensitive though, such as host names, IP addresses, account names or file names (unless they are relevant to the problem). If you do not want to post the log publicly, you can mark the attachment as private.
maheshbabup777@gmail.com

Getting error while using this script file name, directory name or volume label syntax is incorrect

@echo off
 
"C:\Program Files (x86)\WinSCP\WinSCP.com" ^
/log="C:\writable\path\to\log\WinSCP.log" /ini=nul ^
/command ^
"open sftp://root:citi%%40123@10.11.97.21/ -hostkey=""ssh-ed25519 255 sY3DP2CbSTdVkkZVmUVHjszNNDFPEJb8bhlmEZElvc=""" ^
"synchronize local|remote|both  d:\syncfiles\syncfiles  /opt/syncfiles"
"exit"
 
set WINSCP_RESULT=%ERRORLEVEL%
if %WINSCP_RESULT% equ 0 (
  echo Success
) else (
  echo Error
)
 
exit /b %WINSCP_RESULT%