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

Author Message
alexf1852
[View user's profile]

Joined: 2015-07-20
Posts: 3
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?
SSIS_VBScriptTask_SftpUpload_SessionLog.txt (10.49 KB) [Download]

Description: (none)

SSIS_VBScriptTask_SftpUpload.vbs (3.76 KB) [Download]

Description: (none)

Advertisements
alexf1852
[View user's profile]

Joined: 2015-07-20
Posts: 3
Quote:
...
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.
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 25015
Location: Prague, Czechia
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
alexf1852
[View user's profile]

Joined: 2015-07-20
Posts: 3
Embarassed

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!
Advertisements

You can post new topics in this forum






Search Site

What is WinSCP?

It is award-winning SFTP client, SCP client, FTPS client and FTP client integrated into one software program for file transfer to FTP server or secure SFTP server. [More]

And it's free!

Donate

About donations

$9   $19   $49   $99

About donations

Recommend

WinSCP Privacy Policy

WinSCP License