Automating Nightly SFTP Server Backups with WinSCP Batch Scripts and PowerShell
Generate ready-to-run batch scripts and hostkey fingerprints directly from the WinSCP GUI and schedule unattended nightly transfers via Windows Task Scheduler.
Generate ready-to-run batch scripts and hostkey fingerprints directly from the WinSCP GUI and schedule unattended nightly transfers via Windows Task Scheduler.
Generate ready-to-run batch scripts and hostkey fingerprints directly from the WinSCP GUI and schedule unattended nightly transfers via Windows Task Scheduler. This module is built directly into the core WinSCP.exe (GUI) and WinSCP.com (CLI Scripting) binary included in our 11.6 MB standalone Windows installer and Portable USB edition — requiring zero external paid plugins or cloud uploads.
C:\Program Files (x86)\WinSCP\WinSCP.exe (GUI) and WinSCP.com (CLI Scripting) · Config stored in Registry (HKEY_CURRENT_USER\Software\Martin Prikryl\WinSCP 2) or WinSCP.ini (Portable Mode) · RAM working set: 58 MB (during 4-queue parallel SFTP transfer).
WinSCP.com batch files) or the .NET Assembly / PowerShell tab — WinSCP writes the complete script including your exact -hostkey="ssh-ed25519 255 ..." fingerprint!backup.txt and invoke it via WinSCP.com /ini=nul /script=backup.txt /log=backup.log inside Windows Task Scheduler.%ERRORLEVEL% in your batch script (if %ERRORLEVEL% neq 0 exit /b 1) so failed transfers trigger immediate monitoring alerts.| Mode / Option in WinSCP | Recommended Parameter | Engineering & Workflow Benefit |
|---|---|---|
| GUI Code Generator | Generates Batch, CLI & PowerShell | Writes exact connection strings and SSH hostkey fingerprints for you |
WinSCP.com Console Binary | Dedicated headless CLI executable | Runs silently in Windows Task Scheduler, Jenkins, and GitHub Actions |
WinSCPnet.dll (.NET Assembly) | Native PowerShell & C# library | Provides structured try/catch error handling for enterprise ETL pipelines |
/ini=nul Isolated Mode | Zero registry dependency | Ensures scheduled tasks run reproducibly under Service accounts |
Speed up your daily Batch Scripting, CLI & .NET Assembly workflow using these built-in hotkeys, or automate batch runs from PowerShell via WinSCP.com /command "open sftp://user@host/ -hostkey=*" "synchronize remote C:\Local /var/www" "exit":
| Shortcut | Action in WinSCP v6.3.5 |
|---|---|
Ctrl + U | Keep Remote Directory Up to Date (live file-watcher auto-uploads on local save) |
Ctrl + S | Synchronize Local and Remote Directories (preview file diffs by timestamp or size) |
Ctrl + P | Open active SFTP session directly inside a PuTTY SSH terminal without re-entering password |
Ctrl + Alt + P (Preferences) | Configure External Editor (VS Code / Notepad++), SSH Ciphers, and INI Portability |
Related tutorials: explore Directory Sync & 'Keep Remote Up to Date', Amazon S3, Cloudflare R2, WebDAV & FTPS, or visit our WinSCP Troubleshooting Guide if you hit any OS permission prompts.
Yes. All 7 core modules including Batch Scripting, CLI & .NET Assembly are 100% free in WinSCP v6.3.5 with no trial limits.
Yes. The Portable USB build includes the exact same Batch Scripting, CLI & .NET Assembly engine and saves your presets locally on the flash drive.
Presets are stored in Registry (HKEY_CURRENT_USER\Software\Martin Prikryl\WinSCP 2) or WinSCP.ini (Portable Mode) (or inside the application directory in Portable mode).
Explore all 20 verified setup tutorials, module walkthroughs, and troubleshooting guides for WinSCP on Windows, macOS, and Linux.