Earlier i was using wget url, for download but the problem is some times folder names get changed, i don't know how to move in directories in the script (list of directories is not available). After entering in every directory i want to download files ending with ".fna" extension.
I would suggest you see about using lftp, possibly within your shellscript.
It has an interesting feature named "mirror", specifically where you can recurse directories and download files matching a glob pattern, such as "*.fna"