Post a reply

Options
Add an Attachment

If you do not want to add an Attachment to your Post, please leave the Fields blank.

(maximum 10 MB; please compress large files; only common media, archive, text and programming file formats are allowed)

Options

Topic review

Safwan

Re: WinSCP process terminated with exit code 1.

I had the same issue; the problem was not in my user profile. My script would run fine sometimes and other times it would error out with the same error message in this topic. What I found out is that when it failed, I had an Edge window open (to this site), which happens to be also creating and locking some files in the same TMP directory, if I close my Edge browser window, the locked files created in the TMP folder by that window are deleted, and when I run the script, it works just fine. I also tried deleting the TMP folder and making sure I close all browser windows and then run the script, it works, it even recreates the TMP folder.
martin

Re: WinSCP process terminated with exit code 1.

WinSCP does not create the directory. Why would it? It creates the log either implicitly in the the Windows temporary folder or to folder you tell it using Session.XmlLogPath.
If first case, the temporary folder must exists. If it does not, your machine is misconfigured and you must have lot of other problems. Or you told WinSCP explicitly to uses a non-existing path.
rainmanec

Re: WinSCP process terminated with exit code 1.

The directory C:\Users\Administrator\AppData\Local\Temp\1 does not exist.
After manually creating the directory, the program runs successfully.
Why WinSCP can not create folder automatically sometimes?
Thanks!
martin

Re: WinSCP process terminated with exit code 1.

And does the folder C:\Users\Administrator\AppData\Local\Temp\1 exist?
rainmanec

WinSCP process terminated with exit code 1.

WinSCP process terminated with exit code 1. Error output was "Can't open log file 'C:\Users\Administrator\AppData\Local\Temp\1\wscp14A4.03F1F5CA.tmp'.
System Error. Code: 2.
The system cannot find the file specified。
Error occurred during logging. Cannot continue.". Response log file C:\Users\Administrator\AppData\Local\Temp\1\wscp14A4.03F1F5CA.tmp was not created. This could indicate lack of write permissions to the log folder or problems starting WinSCP itself.

This problem does not occur every time, restarting the application still exists, and need to restart the computer to solve it