How do I discard duplicates in a list?

I need to scan a folder, and the output displayed in 2 listboxes. The files
in the folder has the following format :

artist.title

The artist part of the filename goes in listbox 1, the title part in the
other. Now if there are multiple files with the same artist, I don't want
multiple entries in listbox 1, just a single entry, e.g.

Abba.Fernando
Abba.Waterloo

Listbox 1 : Abba
Listbox 2 : Fernando
                Waterloo