Back to HOWTOs

Backup Windows Files with WinSCP


This assumes that you have access to a remote server to which you can upload files from your local Windows machine. I use WinSCP and 7-zip in these scripts, which are both open source and free.

I use this type of backup for smaller files that may change relatively frequently and are important enough that I want to keep them backed up at a remote location (e.g., bookmarks, email addresses, my budget). I have created a shortcut to the BAT file on my desktop and whenever I change a file, I can just double click on it. The script is interactive in that it prompts you for a password to the remote server, so it can't be automated. If you don't mind storing this password in plain text format on your local computer, then you can add the password to the WinSCP command line and automate when the script runs.

Unfortunately, I don't think it's possible to only replace newer files using this method in WinSCP. So, each file gets replaced every time the script is called regardless of whether it has been modified since the last upload.

Related Pages


  • Download my BAT file (TXT link) and the WinSCP script. The BAT file compresses larger files (using 7-zip), calls the WinSCP script, and then deletes the compressed files. The script handles which files get uploaded and where.
  • Read the comments and modify the template to your needs.