LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

I try to list all the .dll files(names, created time,file version) under certain file, but I can not find suitable CVI functions.

I try to list all the .dll files(names, created time,file version) under certain file, but I can not find suitable CVI functions.
1, how to get file's detailed attributes, such like version, created date/time and modified date/time?;
2, how to get all the files with the extension nameof DLL under certain file?
3, use a function to get NI Software installation paths?
Thanks!
Jacky
0 Kudos
Message 1 of 2
(3,167 Views)

Hi Jacky, I can think of a couple of methods to do what you want.

1. Detailed file attributes can be obtained via Windows GetFileAttributesEx function. You can look in MSDN site for the function reference. Strange enough, it cannot be found in SDK help in CVI7, but is regularly found in SDK shipped with CVI6

2. Listing files can be obtained in at least two ways:

2a. Using GetFirstFile and GetNextFile functions to obtain file names one by one, or

2b. Using DOS Dir command redirecting output to a file. For example, "dir /b c:\windows\system\*.dll /o:d > output.txt" produces a file that lists all dlls in windows\system directory without heading and sorted by time. Dir command has a couple of options that can be customized for your needs, just type "help dir" at a command prompt to list all available options. You'll need to read back the output file for obtaining the results of the command

Hope this helps

Roberto



Proud to use LW/CVI from 3.1 on.

My contributions to the Developer Community
________________________________________
If I have helped you, why not giving me a kudos?
0 Kudos
Message 2 of 2
(3,146 Views)