![]() |
Need to Sort Large Files? You need TextPipe!
While TextPipe can easily sort SMALL files such as 100MB in an astounding 30 seconds, it can also handle multi-Gigabyte files as well (one client achieved a 5GB sort/undupe in just 63 minutes). When your main memory runs out, TextPipe writes the sorted file so far to disk, and picks up more file to sort. When finished, it simply merges all the results together. This is the only way possible to sort files larger than main memory.
TextPipe is the only application that lets you not only sort large files, but also pre-process or post-process the sorted data, such as code page conversions, conversions to/from Unicode, restricting changes to a given area, and you can even write custom filters in VBScript or JScript.
It can also be automated or scripted. Download now -->
Like us...you'll find yourself using TextPipe again and again for all kinds of text-processing tasks.
How sorting a file larger than memory works
Most sort tools load the whole file into memory, so they fail or slow to a crawl once the file outgrows RAM. TextPipe uses an external merge sort. It reads as many lines as fit in memory, sorts them, writes the sorted block to a temporary file, and continues with the next block. When the input is finished, it merges the sorted blocks into one output file. Memory use stays flat, and disk space is the only limit.
Example: de-duplicating a mailing list
A 2 GB customer list was built from several sources and contains repeated addresses. Sort by the email column and remove duplicates in one pass:
Before: After sort + remove duplicates: zoe@example.com,Zoe adam@example.com,Adam adam@example.com,Adam zoe@example.com,Zoe zoe@example.com,Zoe
You can sort by a whole line, a column range, or a delimited field, and choose ascending or descending order, numeric or text comparison, and case sensitivity.
Combining sorting with other filters
- Run a grep filter first so that only the lines you need are sorted.
- Convert code pages or Unicode before sorting so that accented characters order correctly.
- Use the merge files filter to join many files, then sort the combined result.
- Write the sorted output as CSV and split it for Excel if it is too long for a spreadsheet.
Related pages
If your source is a mainframe file, convert it from EBCDIC first, then sort. The CSV guide explains field-level editing, and the data conversion solutions page shows how sorting fits into larger migrations. ExcelPipe offers batch operations on Excel workbooks if your data already lives in spreadsheets, see ExcelPipe.
Try it now for free. Setup takes only 1 minute
Installing TextPipe is a simple process that takes only 1 minute.
Need To Convert Data Right Now?
We offer a 90-day money back guarantee, and accept payment online via credit card, and offline via check, wire and purchase order.
Need More Information About TextPipe?
Please click here.
Ask Us a Question!
