Hi.

I need to check a folder for the existance of a specific file extension.

I've been successful checking for a full filename including extension, but Its just any instance of a filetype I'm after.

My question is, Is there an existing method in a library anyone knows about that I could use, or am I looking at string manipulation of some sort.

Appreciate any tips.

If you are on Windows, then look into FindFirstFile(). As the documentation states, you can use wildcards in the file/path name, e.g. "c:\\foo\\bar\\*.txt".

Great, thanks, I'll look right into it.

Appreciated.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.