List of files in a folder inclusive subfolder

Hi,

I need to list the names of existing files in a specific folder. I have written a script for that, but the problem is, it is also picking up name of a subfolder that is there in that folder. I need only the list of files and not that subfolder. How to go about that ? Can anyone plz help...

Maybe it will fit your need :

find . -type f

If you do not want to descend into sub directories:-

find $DIR/* -type f -prune