Topic "Newbi with scripting synchronize or get i have a doubt"

Author Message
SamSmall
[View user's profile]

Joined: 2010-01-06
Posts: 1
Location: France
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
Advertisements
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 25034
Location: Prague, Czechia
Sorry, I do not understand that is it that you want to do that WinSCP cannot do.
_________________
Martin Prikryl
Sokoban
[View user's profile]

Joined: 2009-12-30
Posts: 5
Location: Trondheim
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
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 25034
Location: Prague, Czechia
I have added topic on deleting files after synchronization to FAQ.
_________________
Martin Prikryl
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