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

Advertisement

You can post new topics in this forum