Deleting a file from the remote server

Advertisement

Graham Cracker
Guest

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

Reply with quote

Advertisement

martin
Site Admin
martin avatar
Joined:
Posts:
28,671
Location:
Prague, Czechia

Re: Deleting a file from the remote server

Launch another script with WinSCP from "if errorlevel 0".
_________________
Martin Prikryl

Reply with quote

Advertisement

You can post new topics in this forum