Translate

Tuesday, 18 April 2017

download file from SFTP using WinSCP with batch file(SSIS using process task )

For download
-------------------
option batch on
 option confirm off
 open sftp://UserName:Password@SFTPName:portnumber/ -hostkey="winscphostKey"
 get  SFTPFILEnamewithextension
 close
 exit


For remove file from SFTP
-------------------
option batch on
 option confirm off
 open sftp://UserName:Password@SFTPName:portnumber/ -hostkey="winscphostKey"
 rm  SFTPFILEnamewithextension
 close
 exit



For rename  file from SFTP
-------------------
option batch on
 option confirm off
 open sftp://UserName:Password@SFTPName:portnumber/ -hostkey="winscphostKey"
 mv  oldNamefromSFTPfile userNewname
 close
 exit

No comments:

Post a Comment