Disabling transfer resume support and setting the transfer mode not working for me

Advertisement

alexf1852
Joined:
Posts:
3

Disabling transfer resume support and setting the transfer mode not working for me

Hello,

In my code attached, it is part of a SQL Server Script task with a function that uploads a file to an sftp server. The server has a process that monitors the destination folder for changes. It is sending an email warning that the temporary file ending in .filepart does not exist anymore. The issue is that I tried disabling the transfer resume feature in the code and the servert is still sending warning emails about the Winscp temporary files disappearing. So it seems my code is not turning off the transfer resume support. I also tried forcing the transfer mode to ascii, but the log file that is attached shows that the file is still being transferred in binary mode.

Am I missing something or doing something out of order in my code? Do I need to log into the database server (that runs the SSIS jobs) under the same user the job runs under and run the WinSCP gui to create an .ini file or change the default settings?

Reply with quote

Advertisement

alexf1852
Joined:
Posts:
3

...
Do I need to log into the database server (that runs the SSIS jobs) under the same user the job runs under and run the WinSCP gui to create an .ini file or change the default settings?

I just tried this option and it didn't make any difference. I set transfer mode to automatic and added the .csv extension. But still the log file shows that WinSCP is using original default settings.

Reply with quote

martin
Site Admin
martin avatar
Joined:
Posts:
41,468
Location:
Prague, Czechia

Re: Disabling transfer resume support and setting the transfer mode not working for me

You are not using the FtpTransferOptions anywhere.

You have to pass it as the fourth argument of the Session.PutFiles:

FtpSession.PutFiles(FileToUpload, FtpFilePath, False, FtpTransferOptions).Check()
See https://winscp.net/eng/docs/library_session_putfiles
and https://winscp.net/eng/docs/faq_library_parameters

Reply with quote

alexf1852
Joined:
Posts:
3

:oops:

I had coded the transfer resume support after we were having issues and did not notice that I needed to change the call to PutFiles.

Thanks!

Reply with quote

Advertisement

You can post new topics in this forum