LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

GetFirstFile ("q:\\lab\\results\\*", 1, 0, 0, 0, 1, 0, file_name) returns dir. Y

I am trying to sync two directory trees by copying only files that are not present on target directory tree. I am using GetFirstFile function and selecting option to read only files, but it returns directory names.

 

How can I list files only?

0 Kudos
Message 1 of 2
(2,677 Views)
This is probably because your directories are marked for archiving. As you are asking for archived items, the function returns these directories. You probably want to NOT ask for archived items - only ask for normal files. Or you can filter the results using the GetFileAttrs function - this function returns 1 if the input is a directory.
0 Kudos
Message 2 of 2
(2,649 Views)