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
- Why are some WinSCP scripting commands specified in a batch file not executed/failing?
- Debugging transfer task running in Windows Scheduler, SSIS, or another automation service
- Why WinSCP does not work in a new environment (operating system, machine, user account, network), when it works for me in a different environment already?
- Why I cannot connect/transfer using script, when I can using GUI (or vice versa)?