LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

GetFirstFile and GetNextFile while looking for folders

Solved!
Go to solution

In LabWindows 7.0 "C" I am using a wild card construct to search for folders in a folder called "PAT_DISKS" as shown below:

 

 strcpy(work,"c:\\DEVELOPMENT\\PAT_DISKS\\????MS??_DSK_PAT");
 is = GetFirstFile (work, 0, 0, 0, 0, 0, 1, name);
 is=GetNextFile (name);

there are at least three folders matching the criteria in "PAT_DISKS" but "GetNextFile" does not find them.

 

Is this a bug in LabWindows CVI 7.0  ?

 

0 Kudos
Message 1 of 3
(3,742 Views)

Well, I do not have CVI 7.0, but I have 6.0.

 

I created the exact directory structure in my PC, did the same function call and it was successful for both GetFirstFile and GetNextFile.

Attached are the screenshots.

 

Did you try bu setting the normal attribute to 1? 

 

 

S. Eren BALCI
IMESTEK
Download All
0 Kudos
Message 2 of 3
(3,730 Views)
Solution
Accepted by topic author sweeneyguidant

Thanks,  your response helped me to find the problem.   As normal, it was between the keyboard and the chair.  Without realizing it, I was pointing to an alternate folder I had established earlier for debugging purposes.  There was in fact only one subfolder there so the "GetNextFile" function was working properly.

 

Rob

 

0 Kudos
Message 3 of 3
(3,710 Views)