Utility Library Chapter 8
LabWindows/CVI Standard Libraries 8-28 © National Instruments Corporation
Under Windows, all of the attributes are honored. The normal attribute specifies files with no
other attributes set or with only the archive bit set. The archive attribute specifies files that have
been modified because they were last backed up using the DOS BACKUP command. The read-
only attribute specifies files that are protected from being modified or overwritten. The system
and hidden attributes specify files which normally do not appear in a directory listing. The
directory attribute specifies directories.
If you pass 1 only for the normal attribute, any file that is not read-only, not a system file, not
hidden, and not a directory can match. A normal file’s archive bit may be either on or off. The
normal attribute is the only attribute that requires other attributes not to be set. For example, if
you use the read-only attribute, any read-only file can match regardless of its other attributes.
This holds true for the system, hidden, directory, and archive attributes.
If you use more than one attribute, the effect is additive. For example, if you use the read-only
and directory attributes, all read-only files and all directories can match. If you use the normal
and read-only attributes, all normal files and all read-only files can match.
Parameters
Input searchPath string Path to search.
normal integer Normal attribute.
read-only integer Read-only attribute.
system integer System attribute.
hidden integer Hidden attribute.
archive integer Archive attribute.
directory integer Directory attribute.
Output fileName string First file found.
Return Value
result integer Result of search.
Return Codes
0 Success.
-1 No files found that match criteria.
-3 General I/O error occurred.
-4 Insufficient memory to complete operation.
-5 Invalid path (for example, c:filename in Windows).
-6 Access denied.