Computing.Net > Forums > Programming > sort a .txt file

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.

sort a .txt file

Reply to Message Icon

Name: neX
Date: August 10, 2006 at 09:36:13 Pacific
OS: WinXp
CPU/Ram: 2.17ghz/2048
Product: AMD
Comment:

the problem is that i want the paragraphs to be lists for instance

aodk pakdk pakodoka okapkdapd akodpoakd

aodk
pakdk
pakodoka

etc etc

FOR /F %%i IN (nicks.txt) DO echo %%i >>se.txt
^ that only does the first column and i was wondering if there is any way that it'll do all of them at once.

thx in advance
-neX



Sponsored Link
Ads by Google

Response Number 1
Name: Mechanix2Go
Date: August 10, 2006 at 09:59:47 Pacific
Reply:

Not clear if you're trying to SORT, break lines apart or?


=====================================
If at first you don't succeed, you're about average.

M2



0

Response Number 2
Name: neX
Date: August 10, 2006 at 10:03:30 Pacific
Reply:

im trying to make a list of nicks
btw im new at this lol


0

Response Number 3
Name: Shr0Om
Date: August 11, 2006 at 01:43:27 Pacific
Reply:

Im not sure if i understand you, but..
You want to break down this line:
aodk pakdk pakodoka okapkdapd akodpoakd

To

aodk
pakdk
pakodoka
..

or??
In other words, make a list of a long string.
If not, please elaborate..


0

Response Number 4
Name: neX
Date: August 11, 2006 at 04:45:52 Pacific
Reply:

ok kind of like this:

aodk pakdk pakodoka okapkdapd akodpoakd
aodk pakdk pakodoka okapkdapd akodpoakd
aodk pakdk pakodoka okapkdapd akodpoakd
aodk pakdk pakodoka okapkdapd akodpoakd

To a long list
aodk
pakdk
pakodoka
okapkdapd
etc etc


0

Response Number 5
Name: Shr0Om
Date: August 11, 2006 at 07:00:56 Pacific
Reply:

If you have 5 nicks after each other, separated by a space " "

@echo off
SetLocal EnableDelayedExpansion
for /f "tokens=1-5* delims= " %%A in (nicks.txt) do (
echo %%A >>output.txt
echo %%B >>output.txt
echo %%C >>output.txt
echo %%D >>output.txt
echo %%E >>output.txt
)
EndLocal


0

Related Posts

See More



Response Number 6
Name: neX
Date: August 11, 2006 at 07:50:51 Pacific
Reply:

thx that worked =)


0

Response Number 7
Name: neX
Date: August 25, 2006 at 11:21:19 Pacific
Reply:

im back lol need some help here goes:
well what if the nick list is not aligned like
this:
aodk pakdk pakodoka okapkdapd akodpoakd
aodk pakdk pakodoka okapkdapd akodpoakd
aodk pakdk pakodoka okapkdapd akodpoakd
aodk pakdk pakodoka okapkdapd akodpoakd
but like this:
aodk pakdk pakodoka sadweadokapkdapd akodpoakd
aodk aaapakdk afdfer affepakodoka aadokapkdapd akodpoakd aodk adadwpakdk pakodokaw jokapkdapd afwaakodpoakd adwaear afdferaf dhfhty fghtyhrd
aodk pakdk pakodoka okapkdapd akodpoakd fgdggg
thx in advance


0

Sponsored Link
Ads by Google
Reply to Message Icon






Post Locked

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.


Go to Programming Forum Home


Sponsored links

Ads by Google


Results for: sort a .txt file

batch to edit a txt file www.computing.net/answers/programming/batch-to-edit-a-txt-file/15327.html

Sort a text file in VBScript www.computing.net/answers/programming/sort-a-text-file-in-vbscript/7334.html

Read a txt file in Vb www.computing.net/answers/programming/read-a-txt-file-in-vb/7871.html