Post a reply

Before posting, please read how to report bug or request support effectively.

Bug reports without an attached log file are usually useless.

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: Issue with synchronize remote

Sorry, but "does not seem to be working properly" is not a good problem description. What problem do you have? 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.
vs2019sv

Issue with synchronize remote

Hello

I am trying to run the following batch file from my computer.
It is not syncronizing all of the files to the dir.
How do I exclude hidden files and empty directories?

I am using the following script, but it does not seem to be working properly. Please advise

@echo off
 
"C:\Program Files (x86)\WinSCP\WinSCP.com" ^
  /log="C:\ccs\bin\WinSCP.log" ^
  /command ^
    "open sftp://username@10.10.1.1/ -hostkey=""ssh-rsa 1024"" -rawsettings ExcludeHiddenFiles=1 ExcludeEmptyDirectories=1 DeleteToRecycleBin=1 RecycleBinPath=""/usr/delete/winscprecycle""" ^
    "synchronize remote ""C:\Users\test\testdir"" /usr2/win/vs2019test/" ^
    "exit"
 
set WINSCP_RESULT=%ERRORLEVEL%
if %WINSCP_RESULT% equ 0 (
  echo Success
) else (
  echo Error
)
 
exit /b %WINSCP_RESULT%