The most possible issue is you already have added songs (with copying to iTunes folder, it's by default), removed them with 'keep files' variant.
following steps should fix this:
- Remove weird titles from iTunes library and quit from.
- open your iTunes media folder
~/Music/iTunes/iTunes Media/Videos (you can find it in preferences)
- remove weird titles from this folder (you can save correct file copies if you have no backup)
- Also you should remove these entries from iTunes library.
- re-add correct versions into library.
UPDATE: added awk script and description for.
How to use this script:
- save it to the file named
~ is your home directory)
- open your
Terminal.app and change directory to your iTunes media folder like we talked before (e.g.
cd "~/Music/iTunes/iTunes Meda/Videos")
- remove duplicate files with command
find $(pwd) -type f|sort -r|awk -f ~/dups.awk| xargs -L 1 rmtrash
some important notes:
- this script does respect unicode and spaces in file names. I've tested it.
- I believe that unix-way tools are enough to do this task.(they are the fastest too)
rmtrash is utility from MacPorts, sends files to your Trash.
rm command remove files directly from file system and they can't be restored from trash bin. This is the fastest and the best way if you really sure what do you do.
- using automated stuff like this I always double check if there's no mistakes in output. You can replace command
xargs with arguments with
less command or redirect output to the file (e.g.
if (length(a)+2 < length(b) || a != substr(b, 1, length(a)))
suffix = substr(b, length(a)+1);
return !match(suffix, "^ [0-9]+$");
return substr(a, 1, length(a)-4);
if (length(name) > 0)
if (checkfile(name, file))
name = file;
name = file;