Hi Kumar,
You should state what you are trying to do and what your problem is. This information is very useful to those who would help you. I *guess* that what is going wrong is that you see no output.
You need to save the output of your filter to a file in a directory. You will need to set up a dir2 with getDirectory() before the for(){} loop and run a save command (look at the documentation,
http://rsbweb.nih.gov/ij/developer/macro/functions.html) for each image after it has been filtered and before you close it.
Michael