02-23-2009 02:53 AM
I use GetFirstFile() to search the files in folder,most time is ok,but sometimes get error result ,for example , I search *30a*, the result is the file "YP09040882E.csv",search "30b",the result is"YP090408B0D.csv",it is strange, only occus in specific file name.
my code is :
sprintf(ctemp,"\\*%s*",cYpText);
strcat (searchPath, ctemp);
if (!GetFirstFile (searchPath, 1, 1, 0, 0, 0, 0, fileName)) {
........
}
02-23-2009 03:16 PM - edited 02-23-2009 03:17 PM
02-23-2009 08:34 PM
Hi Mohan,
thanks your quick reply.
this issue can reproducible. this issue is only found in some searching word, give you another sample,search the word "*34*",get result is "YP090409006""YP090408634"...., you can see,"YP090409006" is wrong,see picture below show the code the variables :
02-24-2009 01:13 AM
I am a little bit afraid that I missed something very basic, but the help of GetFirstFile says, that the searchpath can contain the wildcard character *.
So including this wildcard should indeed return _any_ file, including YP09040882E...? No?
Wolfgang
02-24-2009 02:10 AM
Hi,
I use sample "filebrowsing" which from NI and only change the search path to "d:\1\*34*", and run the program, see the result below, in folder"d:\1" have 4 files, searching result is 2 files,one is not correct,could you help me explain what happened? how can I get the correct result?
02-24-2009 02:12 AM
Hi,
I use sample "filebrowsing" which from NI and only change the search path to "d:\1\*34*", and run the program, see the result below, in folder"d:\1" have 4 files, searching result is 2 files,one is not correct,could you help me explain what happened? how can I get the correct result?
02-24-2009 02:45 AM
sorry, I can not assist further, because none of your pictures is displayed in my browser (IE7)...
Wolfgang
02-24-2009 08:15 AM
ttagiio,
To attach pictures to your post, click on the add attachments link below the message field and attach your screenshot. You can embed a picture in your post if it is uploaded on the internet somewhere, but if you just have the picture on your computer, you should just attach it to your post.
02-24-2009 09:30 AM
Hi ttagio,
Which version of CVI are you using? What is the path of the "filebrowsing" example? Also, can you attach the four files in your d:\1 folder, or give the names of these files?
02-24-2009 08:11 PM