Commands

cd - change directory, like on linux

cd /a/b/c

put

put .\local_a\local_b\*.txt
uploads from local to current folder on remote

get

get ./remote_a/*.txt .\local_a\local_b\
downloads from remote to local

Synchronize

synchronize

synchronize remote .\local_a\
upload from local to remote
- new files
- updated files


synchronize local ./remote_a/
download from remote to local
- new files
- updated files

Only synchronize files that match this pattern

synchronize remote .\local_a\ -filemask=*.txt
Batch

Example of running winscp commands from batch file

@echo off
echo Starting WinSCP
set /p USERNAME= Enter username:
set /p PASSWORD= Enter password:

"C:\Program Files (x86)\WinSCP\winscp" /ini=nul /command ^
 "open sftp://%USERNAME%:%PASSWORD%@111.222.333.444/ -hostkey=""insert_hostkey"" " ^
 "cd /var/www/selected_folder" ^
 "put .\folder\*.txt" ^
 "exit"
echo WinSCP finished
This example opens winscp, logs into the remote server, moves folder location on the remote server, and updates files from local to remote