Issue with synchronize remote

Advertisement

vs2019sv
Joined:
Posts:
1
Location:
NY

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%

Reply with quote

Advertisement

martin
Site Admin
martin avatar
Joined:
Posts:
33,710
Location:
Prague, Czechia

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.

Reply with quote

Advertisement

You can post new topics in this forum