Results 1 to 6 of 6

Thread: Comparing File Names

  1. #1

    Thread Starter
    Fanatic Member joltremari's Avatar
    Join Date
    Sep 2000
    Location
    Mississippi
    Posts
    674
    I have two file list boxes that I'm trying to compare the file names and add the like names to a ListBox. Can someone help me with looping thru these two file list to check for matches. I;ve gotten it to sort-of work a couple of times but no cigar yet.

    Any help is appreciated.

    JO

  2. #2
    Frenzied Member JasonLpz's Avatar
    Join Date
    Mar 2001
    Location
    Brooklyn, NY
    Posts
    1,335
    try like this :
    Code:
    Private Sub Command1_Click()
    If File1.FileName = File2.FileName Then
    List1.AddItem File1.FileName
    End If
    End Sub
    - JayWare
    Live to love. Not to Hate

    Im to busy to have a site. But I got one and still working on it.

    http://dre3k.net/

  3. #3
    Frenzied Member JasonLpz's Avatar
    Join Date
    Mar 2001
    Location
    Brooklyn, NY
    Posts
    1,335
    hope that help i tryed it and it seemed to work. Tell me if thats whart you wanted
    - JayWare
    Live to love. Not to Hate

    Im to busy to have a site. But I got one and still working on it.

    http://dre3k.net/

  4. #4

    Thread Starter
    Fanatic Member joltremari's Avatar
    Join Date
    Sep 2000
    Location
    Mississippi
    Posts
    674
    Yes that works, but that only tests the first file in the filelist. I need a way to test all the files.

    Thanks,

    JO

  5. #5
    Frenzied Member JasonLpz's Avatar
    Join Date
    Mar 2001
    Location
    Brooklyn, NY
    Posts
    1,335
    i dont know how to do that but ill try to find out and Are you trying to do like a napster cleanup program ? If the fil names are the same you know which ones are right .
    - JayWare
    Live to love. Not to Hate

    Im to busy to have a site. But I got one and still working on it.

    http://dre3k.net/

  6. #6

    Thread Starter
    Fanatic Member joltremari's Avatar
    Join Date
    Sep 2000
    Location
    Mississippi
    Posts
    674
    I have several directories that the files change from week to week. Each directory can have as many as 400 to 600 files in it at a time. It is not easy for me to go thru all those files looking for duplicate files. So I was trying to add something to an exsisting program I have so I can choose two directories and have it loop thru all the files, find duplicates, and put the duplicates into a listbox. I have all of this set up except I don't know how to loop thru two directories at the same time.

    Thanks for your help,

    JO

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width