vikrant rana
vikrant rana

Reputation: 4674

Overwrite log file using WinSCP command line arguments

I am using Execute process task in SSIS to execute below command line arguments to download the files to some local drive.

/log=G:\USER_DATA\IRM\IRM_SFTP_Logs\IRM_SFTP_Log_Details.txt /command "open sftp://bisftp:*UFVy2u6jnJ]#[email protected]/ -hostkey=""ssh-rsa 2048 xxxxxxxxxxxxx""" "cd /DATA" "get GNRC_IRM_XXXX_EXTRACT*.zip GNRC_IRM_XXXX*.zip  G:\USER_DATA\IRM\IRM_Download\" "exit"

This is running perfect and every time it appends logs to the existing file.

G:\USER_DATA\IRM\IRM_SFTP_Logs\IRM_SFTP_Log_Details.txt 

Is there any way to overwrite the existing log file?

Upvotes: 3

Views: 1541

Answers (1)

Martin Prikryl
Martin Prikryl

Reputation: 202340

To disable session log file appending in WinSCP scripting, set Logging\LogFileAppend raw configuration option:

/log=... /rawconfig Logging\LogFileAppend=0 ...

Upvotes: 4

Related Questions