Get list of just files

This is a discussion on Get list of just files within the C Programming forums, part of the General Programming Boards category; I'm trying to find a way to get a list of only the files inside a directory. If that directory ...

You're right

I was focused more on the directory part and didn't realize I had a brain fart. I had copied some code I found online and hadn't really looked at it. - Thank you for not just laughing at me, but correcting me as well. I can deal with laughter. I can't stand my own laziness.

So, how would you easily detect whether or not it's a directory. I've looking at doing something with a system call like "file *" or "ls -d */" and pipe it to a variable then split up the results then, but that sounds too ugly.

My whole purpose for this is to run diff on every file, but not sub-directories against a "supposedly" duplicate file structure to look for any changes in files.