I need to loop through an entire directory of folders and look for any that
have the same 1st 4 characters. I know how to loop and read just the 1st 4
characters but I need some help determining how to find a duplicate. For
example:
Folder1
Subfolder 0001.....
Subfolder 0002....
Subfolder 0001... (this is a duplicate)
Folder 2
Subfolder 0001...
etc.
David
George Ter-Saakov - 14 Dec 2007 16:20 GMT
You can use Hashtable for that.
Read them and add to Hashtable with a key being a folder's name (first 4
char). You can check if such key already exists by using
if( map["foldername4char"] != null )
map["foldername4char"] = folder;
else
delete duplicate folder.
George
>I need to loop through an entire directory of folders and look for any that
>have the same 1st 4 characters. I know how to loop and read just the 1st 4
[quoted text clipped - 11 lines]
>
> David