Well, I didn't recover gigbytes of space, but the script does what it's supposed to - which is why I downloaded it. And spent the time making it work:
1. Unlike the example in Listing B, the DIR command returns time in a single field, like 07:42p. So,
parse value line with date time am_pm size name
needs to be
parse value line with date time size name
Otherwise, the "format" function gets a file name instead of a file size.
2. 'wordpad' is not a recognized command, unless you provide a path (or if it's in your PATH). I used
'"C:\Program Files\Windows NT\Accessories\wordpad"' out_file /* Let user view the big files */
3. Then it appeared that files were being list multiple times. The sort_in file needs to be deleted or cleared before you start writing to it. I added this after the 'dir' command:
'del ' sort_file out_file /* Clear any existing output file */
Overall, a nice introduction to Rexx. (Reminds me a bit of awk from my Unix days.) A helpful little script. But not a real slick download.