This script UniqueList.vbs extracts, counts and writes a unique list of items from a text or CSV file. You can drag a file onto it or use the command line syntax below. If a CSV file, the unique list is just the first column.
Command line syntax: uniquelist.vbs filewithdupes.txt newfile header
Note that header is YES or NO
This is interesting from a programming perspective because it uses the Microsoft.Jet.OLEDB provider to query a text file as if it were a database.
Rename the file from .txt to .vbs to run.