Automation: Get -delete function on multiple files
I have script today that pulls all files off an SFTP folder down to a local drive. A request has been made to have the files deleted after download. I have read the help and I see that the get -delete function should do exactly what I want, however I do not see how this operation works when the get is pulling multiple files.
Today the command is:
get /In/*ABC* C:\Files\In\
So, in theory, I can change that to:
get -delete /In/*ABC* C:\Files\In\
But, will the job delete each file as it is downloaded, might it delete files it has yet to download, or will it wait until the last file is downloaded to start deleting? The only other way I see to do this is to leave the original get in place, exit the connection, read the files in the C:\Files\In\ folder, then delete each of the files specifically by name.
Thoughts?
Today the command is:
get /In/*ABC* C:\Files\In\
So, in theory, I can change that to:
get -delete /In/*ABC* C:\Files\In\
But, will the job delete each file as it is downloaded, might it delete files it has yet to download, or will it wait until the last file is downloaded to start deleting? The only other way I see to do this is to leave the original get in place, exit the connection, read the files in the C:\Files\In\ folder, then delete each of the files specifically by name.
Thoughts?