Need script to rename the files in different locations

Hi everybody,

I need a script for below issue:

I have totally 15 different locations like */COUNTRY/in.
Only COUNTRy is the variable which changes for 15 countries.
For each location(one per country), there will be four files like abc_def_ddmmyyyy.txt, where ddmmyyyy is the old date.

I need a script which renames all the files for all the 15 countries to current date.
Can any body help on this please?

Regards,
Janardhan

Bash draft (untested):

DATE=$( date '+%d%m%Y' )
for COUNTRY in $COUNTRIES
do
  for FILE in $( ls $COUNTRY )
  do
    NAME=$( echo "$FILE" | sed "s/_[0-9]*.txt/_$DATE.txt/" )
    mv $COUNTRY/$FILE $COUNTRY/$NAME
  done
done