Differences

This shows you the differences between the selected revisions of the page.

2023-01-20 2023-01-20
created (martin) deleting - merged to troubleshooting#scripting (martin)
Line 11: Line 11:
The log file includes useful information for most problems you can encounter with WinSCP. The log file includes useful information for most problems you can encounter with WinSCP.
-===== Inspecting Console Output ===== 
-In rare case when WinSCP fails even before a session starts, the session log file is not produced. In this case the errors will display on WinSCP console output. 
-If you run WinSCP or wrapper batch file directly from Windows Explorer, the console window will close very quickly, so you might not be able to read the output. 
- 
-When debugging script, it always better to use a console window, like Windows Command prompt or PowerShell. Additionally, use [[executables#winscp.com|''winscp.com'' console interface tool]] to run the script, as it (contrary to ''winscp.exe'') outputs to the same console window, where it was started from. 
- 
-&screenshotpict(scripting_debugging) 
- 
-Alternatively, when using a batch file, you can add [[https://learn.microsoft.com/en-us/windows-server/administration/windows-commands/pause|''pause'' command]] to its end to prevent the console window from closing immediately. 
- 
-<code batch> 
-winscp.com /ini=nul /script=script.txt /log=script.log 
-pause 
-</code> 
===== Further Reading ===== ===== Further Reading =====