I using date_suffix="_"$(date +"%m%d%Y") on the script. But the file I am going to FTP are with time. Is there anyway that I can add a logic to grab the file based on the partial name(date)? The files get remote local. But we don no the exact time when the file will be created.
The complete names change daily so you will not be able to specify that. You will have to look for the partial name and then read the full name into a variable or something to do the FTP. The files actually have not only the date but also the time.
What I am doing
echo
“mget $remote_in_file* $local_in_file*
rename $remote_in_file* $remote_out_file”
but the problem is when you ftp its not renaming the file?
Is there anyway I can solve it?
remote_in_file=${REMOTE_FILES[$index]}$date_suffix$ext_suffix
The complete names change daily so you will not be able to specify that. You will have to look for the partial name and then read the full name into a variable or something to do the FTP. The files actually have not only the date but also the time.
What I am doing
echo
“mget $remote_in_file* $local_in_file*
rename $remote_in_file* $remote_out_file”
but the problem is when you ftp its not renaming the file?
Is there anyway I can solve it?
remote_in_file=${REMOTE_FILES[$index]}$date_suffix$ext_suffix