# Issue with synchronize remote

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%

martin
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.