Get with -delete parameter

Advertisement

Bamuser
Joined:
Posts:
2
Location:
Holland

Get with -delete parameter

Hello,

I'm using the command "get -delete prod/out/invoices/*.*"

It is for us important to know how this command functions.

Does this command delete the files file by file at the moment they are read or at the moment all files in the directory are read?

Reply with quote

Advertisement

martin
Site Admin
martin avatar
Joined:
Posts:
29,731
Location:
Prague, Czechia

Re: Get with -delete parameter

A file is deleted immediately after it is transferred.
_________________
Martin Prikryl

Reply with quote

Guest

Re: Get with -delete parameter

Maybe important to know for others

martin wrote:

A file is deleted immediately after it is transferred.

It does delete a file immediately if you use "*.*" inside a directory.

BUT it does not if you transfer a whole directory! The it first transfers all files and deletes afterwards, if it succeded.

See https://winscp.net/forum/viewtopic.php?p=87704#87704

Reply with quote

martin
Site Admin
martin avatar
Joined:
Posts:
29,731
Location:
Prague, Czechia

Re: Get with -delete parameter

Anonymous wrote:

BUT it does not if you transfer a whole directory! The it first transfers all files and deletes afterwards, if it succeded.
That's only true for SCP protocol, as that one is very specific. For other protocols, it works, as said.

Reply with quote

Advertisement

You can post new topics in this forum