3

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]#hU0Zer5AjvDU4@stransfer.xxx.com/ -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?

Martin Prikryl
  • 188,800
  • 56
  • 490
  • 992
vikrant rana
  • 4,509
  • 6
  • 32
  • 72

1 Answers1

4

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

/log=... /rawconfig Logging\LogFileAppend=0 ...
Martin Prikryl
  • 188,800
  • 56
  • 490
  • 992