Post a reply

Before posting, please read how to report bug or request support effectively.

Bug reports without an attached log file are usually useless.

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

martin

Re: Deleting a file from the remote server

Launch another script with WinSCP from "if errorlevel 0".
Graham Cracker

Deleting a file from the remote server

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