Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / ASP.NET / General / December 2007

Tip: Looking for answers? Try searching our database.

Find duplicate subfolders

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
David C - 14 Dec 2007 15:48 GMT
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

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.