Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.
Use Batch to sort lines in a text f
Name: Chester_Lou Date: September 27, 2007 at 16:40:31 Pacific OS: Windows 2000 Pro CPU/Ram: Pentium D, 2 G RAM Product: HP Media Center Edition
Comment:
Hello all
is there anyway to sort lines in a text file (eg. sorting lines to 1-9 a-z) by a batch file? thnx
Name: aegis Date: September 27, 2007 at 17:04:25 Pacific
Reply:
I'm not sure it's what you want, but the virtual DOS has a sort command. It will sort the lines in a file by the first letter. To use it go to the command prompt and type something like the following:
Name: tonysathre Date: September 28, 2007 at 00:04:34 Pacific
Reply:
This is my sorter. It does what you want but doesn't redirect STDOUT to a new file. ::==sorter.bat @echo off if "%1" == "" ( goto :_syntax ) else ( goto :_sort ) :_sort if not exist %1 ( echo %1 could not be found goto :eof ) rename %1 %1.bak sort < %1.bak > %1 del %1.bak goto :eof :_syntax echo USAGE: %0 filename goto :eof
"Computer security." — Oxymoron
0
Response Number 3
Name: Mechanix2Go Date: September 28, 2007 at 00:40:58 Pacific
Reply:
sort < myfile > newfile
===================================== If at first you don't succeed, you're about average.
Summary: Is there a way to insert a text line in between other text lines in a text file that has an ini extension? The new text line is normally placed in line #10 but that could change. In any case the line ...
Summary: i need to replace a key word in a text file through cmd script the record length of a record in the file is 2600. i am using below mentioned code for the same @echo off REM -- Prepare the Command Pro...
Summary: It has been a while since I saw a "like" question... http://www.computing.net/dos/wwwboa... Years ago it was possible to move the cursor to different lines in a batch. The above address the mouse. Re...