Question: rm -f dirname/\* will remove all and only files without prompting for each file. 

This is what I want, 

but this will also display "cannnot remove 'subdirname': Is a directory" 
for each sub directory.

I want to avoid this.

Answer: 
`rm -f dirname/* &> /dev/null`
you can try the find command , however please take note , this will remove every file that it finds in the path and it will remove them recursevly without asking and it will leave only the directories which all of them will be empty 

so you can do something like this :
find /pathdirectory/ -type f -exec rm -rf {} \;

So before you try this , take note again it will delete all files that it finds on that path , and all files that are inside the subdirectories on that path