This is an old revision of the document!

Debugging WinSCP scripts and batch files

This article summarizes useful techniques when debugging non-working WinSCP scripts and batch files.

Session Logging

When using WinSCP scripting, even if it works currently, you always should have session logging enabled. To enable logging, add /log switch to WinSCP command-line.

winscp.com /ini=nul /script=script.txt /log=script.log

The log file includes useful information for most problems you can encounter with WinSCP.

Further Reading