From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

compare two text files

Guys I have two .txt files like the one below

 

00001                

00002

00003

00004

00005

00006

...

Some elements are missing from one to the other one...

 

I need to compare these two and find the different elements of each file...

 

I been reading the old post but I cant figure anything out of them

 

Any ideas???

 

0 Kudos
Message 1 of 7
(6,356 Views)

Many ways to tackle this problem, here is one variant assuming you have multiline strings.

 

CompareLists.png

Message 2 of 7
(6,348 Views)

Hi Darin,

 

I am doing more or less same sort of thing but its between the two folder number of files to be compared and then copying the missing files lets say from folder A to folder B. The first part is not a problem to read the content and then compare them but what I am stuck in is that, I want to see while the VI is running that how much data is being copying and how much is remaining my be in percentage on some status bar or may be time or may be out of 55 files 20 files copyied 35 remaining etc. Can you please guide me through this how to do it any idea. It will be great help.

 

Regards,

Naqqash

Naqqash
0 Kudos
Message 3 of 7
(6,302 Views)

Hi Naqqash,

 

I'm not sure if this is something that could be done at the same time as the comparison is occuring. I'd suggest setting up an event structure such that after the comparison is made, then you know how many files need to be copied and this cues the next event, to copy them over. You could have a buffer or array that extracts those necessary files, then an indicator showing the index of the current position of the file that's being copied over. Let me know if this somewhat makes sense.

 

Regards,

Deborah Y.

Deborah Burke
NI Hardware and Drivers Product Manager
Certified LabVIEW Architect
0 Kudos
Message 4 of 7
(6,270 Views)

Thanks Deborah for the reply. I have uploaded vis and gave more explanation here.. May be then you will get the idea clearly.

Naqqash
0 Kudos
Message 5 of 7
(6,259 Views)

Hi Naqqash,

 

Can you please repost the link, that one is broken, or you can attach your work directly to your post.

 

Thanks,

Deborah Y.

Deborah Burke
NI Hardware and Drivers Product Manager
Certified LabVIEW Architect
0 Kudos
Message 6 of 7
(6,236 Views)