Topic "Deleting a file from the remote server"

Author Message
Graham Cracker

Guest


How do I delete a file from the remote server after I have successfully downloaded it?

I use the following script file:

option batch on
option confirm off
open user:user@255.255.255.255
get dnload.txt d:\usr\local\dirname
close
exit

I am executing this script file from the following batch file:

@echo on
cd C:\program files\winscp3
winscp3 /console /script=dnload.txt
if errorlevel 1 goto failure
if errorlevel 0 goto success

:success
echo FILES SUCCESSFULLY DOWNLOADED!
goto end

:failure
echo ERRORS DURING TRANSFER. FILES WERE NOT DOWNLOADED!

:end

Any help you can give me will be greatly appreciated.

Thanks
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 24555
Location: Prague, Czechia
Launch another script with WinSCP from "if errorlevel 0".
_________________
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