For loop for number of files in a folder

Hi All,

Need a for loop which should run for number of files in a folder and should pass the file name as parameter to another shell script for each loop.

Please help me.

Thanks.

cd dir
for fname in *
do
 [ -f "$fname" ] && scriptname "$fname"
done

Thank you :b: