INTERACT FORUM

Please login or register.

Login with username, password and session length
Advanced search  
Pages: [1]   Go Down

Author Topic: help deleting duplicates  (Read 5625 times)

Hebaton

  • Recent member
  • *
  • Posts: 42
help deleting duplicates
« on: July 27, 2015, 12:53:23 pm »

hello,
after finding an article on this board I attempted to get rid of duplicate entries in the Library database.
I created a smartlist and applied the following commands

~dup=[File Size],[Name]   ~nodup=[File Size],[Name]

this located duplicates and removed them from the list but how do I commit those changes to the DB ?

thank you,

Claude
Logged

blgentry

  • Regular Member
  • Citizen of the Universe
  • *****
  • Posts: 8014
Re: help deleting duplicates
« Reply #1 on: July 27, 2015, 03:03:43 pm »

As I understand it, when you use the ~nodup function, it removes duplicates at random.  That is, it doesn't necessarily select the ones to remove based on type or date or anything else.  It just removes all but one of the matches, randomly.  Which probably is not what you want!  :)

Instead, you probably want to sort the duplicates and figure out why you have them.  Maybe you have two copies of the exact same album because your library has imported a backup copy from another disk location.  I would normally say that maybe you have two different formats also, but you are using file size, so that should guarantee that you are looking at two files that are the same format.

Try this as a test.  Use this expression:

[Media Type]=[audio] ~dup=[File Size],[Name] ~sort=[Artist],[Name],[Filename]

Pay attention to the file names.  See if you have duplicates that are all in the same directory hierarchy, or if there is some other obvious pattern to why you have duplicates.  If you find they are all in the same directory structure, you can re-sort by just filename and then delete all of the ones that are in the directories you don't want to keep.

If you have trouble, it would be a good idea to post a screen shot or some other dump that shows 10 or 20 duplicates; make sure the file name is visible.  Then we can try to guide you on how to best deal with them.

Good luck.

Brian.
Logged

Hebaton

  • Recent member
  • *
  • Posts: 42
Re: help deleting duplicates
« Reply #2 on: July 28, 2015, 08:08:40 am »

Hello Brian,
I thank you for you good advice on this matter but really, what I am dealing with here is multiple pointers to the same file. i had hard drive trouble and used the sear h and replace function to redirect entries to the new drive. That is what seems to have caused the issue.

So, to keep things simple, I am entirely satisfied with the results of the ~nodup function. I really just need to find how to commit the results. To the DataBase

Regards,

Claude
Logged

ferday

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 1732
Re: help deleting duplicates
« Reply #3 on: July 28, 2015, 09:40:05 am »

You can check 'fix broken links' in the import menu, Also check 'ignore previously deleted files', then re-run import

Logged

Hebaton

  • Recent member
  • *
  • Posts: 42
Re: help deleting duplicates
« Reply #4 on: July 28, 2015, 09:52:12 am »

Hi Ferday,

Not sure I understand you.
You are suggesting I rebuild a smartlist with the previousley stated command plus your addition and then run Auto import ?
Am I getting this right ?

Claude
Logged

ferday

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 1732
Re: help deleting duplicates
« Reply #5 on: July 28, 2015, 10:06:26 am »

When you run your ~nodup smartlist you break the database links

You can try running the smartlist to your satisfaction, deleting the dups and then going into import options, checking those boxes, and running import.  It may just get rid of the DB links to the nodup tracks...

Logged

blgentry

  • Regular Member
  • Citizen of the Universe
  • *****
  • Posts: 8014
Re: help deleting duplicates
« Reply #6 on: July 28, 2015, 11:25:51 am »

Hebaton,

The smartlist you made with ~nodup is just a view.  It doesn't change anything in the database; I gather you got the idea on that already.  It's also not *designed* to make changes.  So if you want to use this view to make changes, we need to figure a way of doing that.

I would advise you to make a database backup before you do any deletions.  Just in case.  File > Library > Backup Library .  Make note of the location you tell it to save the backup at.

If you're absolutely certain that each of your pairs of duplicates point to the exact same file, then I think the answer is pretty simple.  Just highlight all of the songs/files in your ~nodup list, and press delete.  It will pop up a dialog box asking you how to delete them.  Choose, "remove from database only".

The only problem with this is if they don't really point to the same files.  You might try my technique above on just one album.  Do the delete, and then go back into your Albums or Artists view and make sure that whole album is still in the library.  If that works, you could do more of the list, or ALL of it at once if you want.

Again, if you're not super duper sure, post a screen shot showing some of the duplicates.  Not the nodup list.  The actual duplicates.

Good luck!

Brian.
Logged

Hebaton

  • Recent member
  • *
  • Posts: 42
Re: help deleting duplicates
« Reply #7 on: July 28, 2015, 12:01:03 pm »

Hi again,
I am sure this is the way to go.
Just one thing,the resulting view from the nodup list is whats left after all duplicates but one have been removed.
So there would still be dups after deleting those. i suppose I could run it several times until I find no more duplicates...

Claude
Logged

blgentry

  • Regular Member
  • Citizen of the Universe
  • *****
  • Posts: 8014
Re: help deleting duplicates
« Reply #8 on: July 28, 2015, 02:03:22 pm »

Ok, if you have multiple duplicates that are all the same file names, I have a procedure for you.  You'll need three smart lists:

1.  Keep:  This is the list you already have that has the rule:  ~dup=[File Size],[Name]   ~nodup=[File Size],[Name]
2.  Dupes:  This is all of the duplicates with rule:  ~dup=[File Size],[Name]
3.  Remove:  Now we take Dupes and remove all the keeps from it.  Rules:
  A.  Playlists "is any" Dupes
  B.  Playlists "is not any" Keep

Now the playlist named Remove should have everything you want to get rid of.  All of the duplicates, except for the single copy of each file that you got from the playlist named Keep.  You can delete all of the members of this list to get rid of your extra duplicates.

That should do it as far as I can tell.  As always, make a library backup first and test on a subset of files.  Let me know how this works out for you.

Brian.
Logged

Hebaton

  • Recent member
  • *
  • Posts: 42
Re: help deleting duplicates
« Reply #9 on: July 28, 2015, 11:26:47 pm »

Hey Brian,
Your procedure worked like a charm, at least I think so thus far. Anyway, I have backups of every step so, no permanent damage could have been done.

Thanks a lot man, the end of a sleep steeling nightmare...

My best,
Claude
Logged
Pages: [1]   Go Up