Sign in to follow this  
H-K

Problem with _wfindfirst

Recommended Posts

Hello everyone! I've got a little problem with the _wfindfirst (same as findfirst but unicode) function, and I wondered if someone here could shed some light :) I want to get a listing of files with a certain extension, and I know I just have to pass a wildcard as param to _wfindfirst to do this. That gives me all the files with that extension, but it's also returning files with longer extensions that match the first three characters (i.e. for filter "*.dae", I also get "*.dae_cache") Right now I am solving this by doing a second filter myself, but I feel this is rather workaroundish, so I'd like to know if there is a way to do it properly. Checked on MSDN and found some stuff on the Managed runtime that applied to what I'm getting (here), but the solution they mention is not working for me. Also searched in forums here but haven't found anything. No need to say any help will be greatly appreciated :) And thanks in advance. Cheers!

Share this post


Link to post
Share on other sites
This should be a Windows backwards compatibility "feature" (when filenames where 8.3) and it is possible that the only thing to do is indeed to filter out names not ending with ".ext" yourself.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this