VBScript lacks the native capability to sort an array, which is why I created a Windows Script Component (WSC) named VBSort.wsc. As I described in "Sorting Arrays in VBScript" (April 2006, InstantDoc ID 49458), the main object in this WSC is Penton.VBSort. Let's explore how to use this object by looking at a script named Sorter.vbs. This script uses Penton.VBSort to sort data in one file and write it to another file. Because Sorter.vbs supports both standard input and standard output, you can also use it to sort redirected lines of text.
You must be a paid VIP Member to access this entire article.
Already a VIP Member? Please log in now: