I have to setup with the banking interface where I need to connect to the remote bank and then download the files in the bank server in-box to my local server for further processing
so i do following sftp commands in the crontab
sftp -b /usr/local/CoXXX/inbox/get.sh user@host
while my get.sh has this
cd CoXX/inbox get ^DELIST* get ^BPAY* bye
however my requirement is to after i download the file i need to rename that file in the server to D-(SAME FILE NAME), just adding a D- identify the its has been already processed.
how to i do that if i do
rename DELIST* D-DELIST*
i think it will rename all files (not the file that has been downloaded) how do i archive this ?