Ok, maybe I can approach this in a different way. As I go through adding files to the dictionary, I am also adding them to the two listboxes, one for Source, the other for target.
The missing files in each are still in the other. So after searching the dictionary and finding a missing key value, it exists not only in the other dictionary, but also the other listbox. Is there a way to retrieve the Path information for that key value from the listbox -- where it's still correct? I.e., can I do a lookup on the listbox without having to step through every entry to find the filename that is the missing key value, and then retrieve the data from the cells in that row? Thanks again :) All My Best, Jeffrey > Hi, Joe-- > > Thanks. > > I am actually using the CellTag now, for another part of the code. > > What I'm doing is comparing two folders and checking each for discrepancies > (files which exist in one folder but not in the other). The method has been to > add everything to two dictionaries, then add all files found in each folder to > a listbox. I then compare the two dictionaries for the entire list of each > folder, and see if each dictionary contains the same files. If one doesn't, I > call that up and add it to the listbox for the folder missing the file, and > mark it as missing. > > The problem is that the paths to the files in the dictionaries, as you > suggested, are completely wrong. I'm getting the correct missing filenames > allright, and that is found by the index but when using the code below, the > Path comes out wrong. > > I'm not sure I understand why this happening. The relevant code is: > > If not TargetDictionary.HasKey(SourceDictionary.Key(j)) then > TargetList.AddRow SourceDictionary.Key(j) > f=SourceDictionary.Value(SourceDictionary.Key(j)) > > where SourceDictionary.Key(j) is the name of the file, and f is the folderitem > which I earlier assign to that key's value. In that case, shouldn't > > TargetList.Cell(TargetList.LastIndex,1)=f.absolutepath > > give me the absolutepath of the folderitem for that key? > > All My Best, > Jeffrey _______________________________________________ Unsubscribe or switch delivery mode: <http://www.realsoftware.com/support/listmanager/> Search the archives of this list here: <http://support.realsoftware.com/listarchives/lists.html>
