Logo 
Search:

MS Office Answers

Ask Question   UnAnswered
Home » Forum » MS Office       RSS Feeds
  Question Asked By: Darryl Perez   on Feb 27 In MS Office Category.

  
Question Answered By: Chau Tran   on Feb 27

Seeing your lists  are sorted, you just need to work through them item by
item. If the current cell in the new array  is less than the current cell in
the old array, then you have a new file. This means that you need "current
cell" pointers for each array - simple  integers holding the current array
index.

You just need to step these along through the arrays  (if = step both, if <
do something then step one, if > do ?? then step the other). Stop once both
pointers have gone past the end of the arrays.

One complication with array matching is dealing with the last entries in the
arrays (i.e. it might fall off the end of one  array, while the other one
still has entries). You can either do that with more complex IF statements,
or cheat and add an extra item at the end of each array - both of them the
same, and both of them being a very high sort-order, perhaps "~~~~", but
check the ASCII sort order.

What are you going to do about files  that have been deleted from the first
directory? (I.e. my "do ??" above.)

Share: 

 

This Question has 2 more answer(s). View Complete Question Thread

 
Didn't find what you were looking for? Find more on Comparing file lists Or get search suggestion and latest updates.


Tagged: