Move (download and delete) files from SFTP server

sftpwinscp

I am using a WinSCP (SFTP) script to move files off a SFTP server. Something like this:

get *.ecx

But this only "copies" files from remote to local. I need to move files off the server. What server command can I use to move multiple files? mv doesn't seem to work as it looks like both arguments are remote.

I was not able to determine SFTP server being used:

winscp> version
Unknown command 'version'.

Best Answer

I found the answer:

http://winscp.net/eng/docs/scriptcommand_get

-delete      Delete source remote file(s) after transfer.
Related Question