View Single Post
  #5  
Old September 4th 18, 05:34 PM posted to alt.windows7.general,microsoft.public.windowsxp.general
R.Wieser
external usenet poster
 
Posts: 1,302
Default Merge text files & then sort unique in DOS

Grease Monkey,

Merging text files is easy in DOS
for %f in (*.txt) do type "%f" output.txt


Another way, likely faster:
copy *.txt output.txt
-or, for safity-
copy /a *.txt output.txt

But how do you sort unique in DOS?


You don't. There is no such (buildin) command available.

But Google is your friend: "xp batch remove duplicate lines" (without the
quotes).

First result ? Looks to be a keeper:
https://stackoverflow.com/questions/...from-text-file

Regards,
Rudy Wieser


Ads