VBSort.wsc to the Rescue: VBScript No Longer Lacks an Array Sorting Method

Unlike JScript, VBScript doesn't provide a method that lets you sort arrays. However, you can use a Windows script component named VBSort.wsc to quickly sort VBScript arrays.

Karen Bemowski

April 3, 2008

1 Min Read
ITPro Today logo in a gray background | ITPro Today

Sorting an array is a common scripting task, but VBScript doesn't provide a native capability to do so. To fill this gap, Bill Stewart has written VBSort.wsc. This Windows script component implements the Penton.VBSort object, which provides three properties and a method that let you quickly sort VBScript arrays.

Bill discusses how to register and use VBSort.wsc in "Sorting Arrays in VBScript". He also presents a script, Sorter.vbs, that uses VBSort.wsc in "Using the Penton.VBSort Object to Sort Arrays". You can use Sorter.vbs to sort data in one file, then write the sorted data to another file. You can also use it to sort redirected lines of text. I opened up both articles for public viewing through May 1. If you enjoy reading these articles, you can get more of this type of content by subscribing to Scripting Pro VIP.

Sign up for the ITPro Today newsletter
Stay on top of the IT universe with commentary, news analysis, how-to's, and tips delivered to your inbox daily.

You May Also Like