>I was thinking about something like this, but when I tried myDir + "*g*.*" it returned wrong file...
I think that is the way the wildcard works in DOS / Windows.
The wildcard is quite primitive; if you need more control, you better get all the filenames, and do the matching in VFP.
Difference in opinions hath cost many millions of lives: for instance, whether flesh be bread, or bread be flesh; whether whistling be a vice or a virtue; whether it be better to kiss a post, or throw it into the fire... (from Gulliver's Travels)