in reply to Re^2: copy files on sftp to local dir and delete copied file
in thread copy files on sftp to local dir and delete copied file
Are you sure you want to eliminate anything that begins with '.' (just asking, you very well might)? If not, it would likely be better to explicitly call out '.' and '..'.
You may also want to consider what you mean by success. For example, are you certain the remote side is not being written to? There is a race condition between the get and the remove calls. OTOH, if the source location is unchanging (other than this script), you may be just fine.
--MidLifeXis
|
|---|