Message-ID: <332E2C5D.12AE@ibm.net> Date: Mon, 17 Mar 1997 23:47:09 -0600 From: Jeff Harlow Reply-To: jharlow AT ibm DOT net Organization: none MIME-Version: 1.0 To: opendos AT mail DOT tacoma DOT net Subject: Re: [opendos] Wishlist v2.0 References: Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Colin W. Glenn wrote: > > Will sort return an error code if the file is larger than free memory or > 64K? Then I could use that and either: > > sort success: kill oldname > rename newname (to) oldname > sort fail: kill newname I couldn't find any documented exit codes for SORT in what I have within reach, but I tried the following at the DOS prompt with a 63KB filename.ext and a 126KB filename.ext: sort < filename.ext > filename.srt if errorlevel 2 echo 2 if errorlevel 1 echo 1 if errorlevel 0 echo 0 63KB filename.ext returned 0 126KB filename.ext returned 1 Be sure to test this thoroughly before relying on it, and try to find out if sort exit codes are documented anywhere. Jeff Harlow