Synchronize batch file for changing file name
Here is what I have so far:
@echo off "C:\Program Files (x86)\WinSCP\WinSCP.com" ^ /log="C:\writable\path\to\log\WinSCP.log" /ini=nul ^ /command ^ "open sftp://unknkown:VFLx98u3g@files.insighthosting.com/ -hostkey=""ssh-rsa 1024 c36bXCOIuJJlXQcAxy3DLz+UYidT6Ylhfjdk4syUk="" -rawsettings CacheDirectories=0 CacheDirectoryChanges=0" ^ "synchronize local E:\Program Files\Microsoft SQL Server\MSSQL13.MSSQLSERVER2016\MSSQL\Backup /production/90872/backup/" ^ "exit" set WINSCP_RESULT=%ERRORLEVEL% if %WINSCP_RESULT% equ 0 ( echo Success ) else ( echo Error ) pause exit /b %WINSCP_RESULT%