I recently had a requirement to build a powershell script that performs SFTP/FTPS transfers that would survive reboot.
Operation and security constraints lead to me running the script as a service, to survive reboot.
After allowing the service to run for a day, I noticed my HDD was full. As it turns out, there were several Gb worth of files like 'wscp1048.017658A6.tmp' in C:\Windows\Temp
The code I've been running is here
(WinSCP code starts at line 1006)
I have several MB of transaction logs as well (There's a log for each time WinSCp downloads, or enumerates a foreign directory)
So far I've read that files that are edited via WinSCP, may be temporarily stored in C:\Windows\Temp but I don't know why they would persist between sessions/ runs
If anyone has had this issue, or can point me in the direction of a resource that can help I would be quite grateful.