Microsoft KB Archive/33573

Using the DOS SORT Command to Sort a Large Document

PSS ID Number: Q33573 Article last modified on 11-02-1994

3.00 3.10 3.11 4.00 5.00 5.50 6.00

MS-DOS

= SUMMARY =

The DOS SORT command can be used to sort a data document that is too large for Word to sort using the Library Autosort command. When a large document is sorted using Library Autosort, an “Insufficient memory” error message may occur.

The DOS SORT command sorts only an unformatted file that is 63K or less in size. Therefore, you must remove all of Word’s formatting before performing the sort.

Perform the following steps to sort a large document. Assume the document’s name is DATAFILE.DOC.

  Delete any running headers or footers in the document.   Save the document with the “formatted:” field under Transfer Save set to No. (In version 5.50, select “Text Only” in the Format box under File Save As.)   Quit Word to return to the DOS prompt.   Enter the following DOS command to sort the document: SORT < DATAFILE.DOC > NEWFILE.DOC   Copy the new file back to the original document filename with the following DOS command: COPY NEWFILE.DOC DATAFILE.DOC   The document is now sorted. Load it into Word, reenter the running headers or footers, and reapply the formatting. 

For more information, read the section in your DOS manual that discusses the SORT command.

KBCategory: kbother kberrmsg KBSubcategory: Additional reference words: ============================================================================= Copyright Microsoft Corporation 1994.