LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Is there a way to check if a directory of vi files has been modified?

We have a need to easily determine if a directory with subdirectories full of hundreds of LabVIEW vi's has been modified. We would like to be able to check if a "baselined" directory of files matches with a copied version of the same directory. We have experienced problems when someone modifies one or two vi files out of several hundred without notification, then the resultant code doesn't work properly when executed as some later time. For diagnostic purposes we would like to be able and check quickly if someone actually has modified any vi without laboriously reviewing each vi by hand. We were thinking of some stand alone software possibly a LabVIEW vi that could check automatically the copied version against the baselined version.
0 Kudos
Message 1 of 5
(3,212 Views)
You should write a configuration check vi that basically loops through all subdirectories and all files, and records the date/time stamp of every file alongside the filename in a textfile. You can use the File Info function (Last Mod terminal) to get the date/time stamp. Then when you want to check if anything has changed, you loop through all files and check the Last Mod against the file entries. If there is a mismatch, you can display the filename that is mismatched. This is a generalized solution. If you need help with creating the vi, please ask. Also, you should always keep a backup of all files in case someone has tampered with a file.
- tbob

Inventor of the WORM Global
0 Kudos
Message 2 of 5
(3,203 Views)
I would also like to say you should download the openG tools from openG.org the have a lot of useful file tools that will allow you to actually search into an LLB if you want to go into the comparison that far. You may want to look into some sort of security like Visual Source Safe or something similar that way you could keep track of who checked the file out last and modified it and so on.

all in all though this would not be to hard to do.


Hey TBOB

GO VOLS!!!!!!!!!!!!!!!!!!



Joe.
"NOTHING IS EVER EASY"
0 Kudos
Message 3 of 5
(3,190 Views)
I would go with the archive bit, unless it is used by your backup sofware.

The OS sets the archive bit when a file is modified. Reset this bit once the files are correct and check it for modification. See the attrib.exe command.


LabVIEW, C'est LabVIEW

0 Kudos
Message 4 of 5
(3,182 Views)
The best way to go is to have a combination of Source Safe and a config check vi. VSS for backups, and the config check to see if anyone changed a file on the local machine. The config vi can check either timestamps or the archive attribute as Monsieur Drolet mentioned. Your choice.

Joe: I won't mention where the VOLS can go on this forum, it would be inappropriate. 😉 GEAUX TIGERS!!!
- tbob

Inventor of the WORM Global
0 Kudos
Message 5 of 5
(3,177 Views)