>> so i need for each unique key (there are more then one) the news file will remain
I don't get what exactly you want to do..May be you could have been more clear !!
Well the following script extracts each field (key and date-time) from the file name..
Code:
#!/bin/bash
ext=".3gp" #put the file extension here
for f in *.3gp #repeats of for each file in the directory
do
#extract the filename without extension
base=`basename $f $ext`
echo $base
#extract the prefix
pref=`echo $base | cut -c 5-13 -`
echo $pref
#extract date and time
dtime=`echo $base | cut -c 14-25 -`
echo $dtime
done