Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Compare StringLists

Posted on 1998-05-28
2
Medium Priority
?
978 Views
Last Modified: 2012-05-04
I am looking for a clever solution to compare the content of a StringList 1 with the content
of a StringList b. The content of StringList a is a "snapshot" of a directory a few days ago
(i.e the name of the files in this directory) and the content of StringList b are the the actual
filenames found in the same directory. Maybe there are some more files today than bevor
or somes are deleted.

Any hint is welcome!

Thanks a lot.
0
Comment
Question by:rjufer
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 7

Accepted Solution

by:
BlackMan earned 800 total points
ID: 1348479
I think the best solution is to sort both lists. Then you can walk thru the lists in the following manner: (I call them A and B)

If A[index] < B[Index] Then A has items, that are not present in B. Increase Index until A[Index] >= B[Index]

Likewise, if B[index] < A[Index] Then B has items, that are not present in A. Increase Index until B[Index] >= A[Index]

When Index exceeds the number of items in either list A or B, the remaining items in the other list are new entries.
0
 

Author Comment

by:rjufer
ID: 1348480
Hi

Thanks very mutch for your hint, just great .....!!!!

Rolf
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction The parallel port is a very commonly known port, it was widely used to connect a printer to the PC, if you look at the back of your computer, for those who don't have newer computers, there will be a port with 25 pins and a small print…
In my programming career I have only very rarely run into situations where operator overloading would be of any use in my work.  Normally those situations involved math with either overly large numbers (hundreds of thousands of digits or accuracy re…
This tutorial will teach you the special effect of super speed similar to the fictional character Wally West aka "The Flash" After Shake : http://www.videocopilot.net/presets/after_shake/ All lightning effects with instructions : http://www.mediaf…
We’ve all felt that sense of false security before—locking down external access to a database or component and feeling like we’ve done all we need to do to secure company data. But that feeling is fleeting. Attacks these days can happen in many w…
Suggested Courses

715 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question