Post a reply

Options
Add an Attachment

If you do not want to add an Attachment to your Post, please leave the Fields blank.

(maximum 10 MB; please compress large files; only common media, archive, text and programming file formats are allowed)

Options

Topic review

Sokoban

Re: Newbi with scripting synchronize or get i have a doubt

SamSmall wrote:

hie all, iput my context:

i have a windows server where i have set a task scheduled to start get every one hour, i retrieve log file from a remote server (unix).

i use synchronize option before but i encounter an issue because i can't delete file after transfer only 'get' can do that.

so someone can help me to automate this script without alert.

task scheduled:

"C:\Program Files\WinSCP\winscp.Exe" /console netreport@mrs-ix-00002.xxxxxxx.com /privatekey="D:\Sources\NetReport_New_PPK.ppk" /script="D:\script\Script_SFTP_SG1.txt"

Script_SFTP_SG1.txt

cd /prd/proxy/netreport/ProxySG1
get -delete *.log "D:\Applications\Netreport\Logs\Engine\FlatFile\Proxy SG1\"
exit


Do you have try with RM? --> https://winscp.net/eng/docs/scriptcommand_rm
//Sokoban
martin

Re: Newbi with scripting synchronize or get i have a doubt

Sorry, I do not understand that is it that you want to do that WinSCP cannot do.
SamSmall

Newbi with scripting synchronize or get i have a doubt

hie all, iput my context:

i have a windows server where i have set a task scheduled to start get every one hour, i retrieve log file from a remote server (unix).

i use synchronize option before but i encounter an issue because i can't delete file after transfer only 'get' can do that.

so someone can help me to automate this script without alert.

task scheduled:

"C:\Program Files\WinSCP\winscp.Exe" /console netreport@mrs-ix-00002.xxxxxxx.com /privatekey="D:\Sources\NetReport_New_PPK.ppk" /script="D:\script\Script_SFTP_SG1.txt"

Script_SFTP_SG1.txt

cd /prd/proxy/netreport/ProxySG1
get -delete *.log "D:\Applications\Netreport\Logs\Engine\FlatFile\Proxy SG1\"
exit