LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

compare string name files

Hi,
 
I have a VI that compare the numbers files in the folders. If the numbers files changes, he execute
a script in diadem else nothing.
I would replace this counter of files by a function that compare two string name of files.
For example:
1st name file acquisition :10-57-35-7-2-2008.acq
2nd name file acquisition : 5_10-57-35-7-2-2008.acq
I want just compare that is bold.
If that is in bold aren't identical, I would execute a script in diadem
I join VI of my application.
 
0 Kudos
Message 1 of 5
(3,128 Views)
Hi samosi,

could you try the attached vi?

The vi in the upper left is found in advanced file functions palette...


Message Edited by GerdW on 03-06-2008 04:02 PM
Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Download All
0 Kudos
Message 2 of 5
(3,118 Views)
Greetings. Is there a specific format to what's in bold? For example, is it always the same number of characters? Or, could you have 10-57-35-07-02-2008.acq? It seems that the month and day is formatted as a single character. One way to do this is to search the file name string for "-", and then take the text starting at 2 characters back, or the text that appears after the "_" if there's one there. A more explicit answer can be provided if you can provide more details on the format of the string.

A suggestion is attached.
0 Kudos
Message 3 of 5
(3,113 Views)
Hi,
In attachment you have an example to perform this comparation. Let me know if it's ok for you.

    Benjamin R.


Senior LabVIEW Developer @Neosoft


0 Kudos
Message 4 of 5
(3,111 Views)
Tip for previous example: You can just use the "offset of match" output with a <0 or >=0 Comparison function (depending on whether you want the indicator to indicate match or no match). Less code. Smiley Wink
0 Kudos
Message 5 of 5
(3,101 Views)