Skip to main content
gamedev.net
🔒 Locked

Problem with _wfindfirst

Started by H-K Dec 16, 2008 at 11:07 AM 0 replies 1.5k views
Original Post
H-K
H-K
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!
visitor
visitor
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.

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.