FTP Update using WinSCP

you need to make the below script and then call it using below syntax

“c:\Program Files (x86)\WinSCP\WinSCP.com” -script=”Script Path”


# Automatically abort script on errors
option batch abort

# Disable overwrite confirmations that conflict with the previous
option confirm off

# Force binary mode transfer
option transfer binary

#if you want to contiue on error. does not abort even the failing command.

option batch continue


#open connection to ftp

open ftp://user:password@ftp_address

# Publish local theme up to server, while deleting obsolete files from server.

#you can ignore this if you just to syncronize.

rm /site/wwwroot/file_or_folder_1
rm /site/wwwroot/file_or_folder_2

synchronize remote -delete local_path_where_new_code_is /site/wwwroot    ##/site/wwwroot is the destination path

echo Job is complete.



Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s