Google Answers Logo
View Question
 
Q: PC Sort Utility ( No Answer,   11 Comments )
Question  
Subject: PC Sort Utility
Category: Computers > Programming
Asked by: softballkid-ga
List Price: $5.00
Posted: 21 Jul 2005 07:34 PDT
Expires: 20 Aug 2005 07:34 PDT
Question ID: 546184
Hi,
I'm looking for a Windows based sort utility. I have a text file that
I want sorted based on some fields in the file. I'm looking for
shareware for now but would be interested in buying something if it is
the only thing available.
Thanks,
softballkid1961
Answer  
There is no answer at this time.

Comments  
Subject: Re: PC Sort Utility
From: hammer-ga on 21 Jul 2005 07:37 PDT
 
What about the built-in Sort command?

- Hammer
Subject: Re: PC Sort Utility
From: shockandawe-ga on 21 Jul 2005 07:50 PDT
 
Or use microsoft excel presuming you have it.
Data... Import External Data... Import Data then choose text as the file type.

(Or even just try pasting it into an excel worksheet and then using
Data... Text to Collumns command.
Subject: Re: PC Sort Utility
From: softballkid-ga on 21 Jul 2005 09:19 PDT
 
Hammer,

What is the built-in Sort command?

Softballkid1961
Subject: Re: PC Sort Utility
From: softballkid-ga on 21 Jul 2005 09:26 PDT
 
shockandawe-ga,
I did forget about Excel but I would like to do the sort as quickly as
possible because I will be sorting 10 - 20 times a day. Ideally, I
would like a batch job that I run with a click of a mouse button. I
guess I should have mentioned that in my question.

Thanks,
Softballkid1961
Subject: Re: PC Sort Utility
From: bamrish-ga on 21 Jul 2005 10:27 PDT
 
Try this:
Suppose your file is Data.txt stored at C:\Text files\Data.txt and it
contains following data

--- Data Start ---
First
Second
Third
Fourth
Fifth
--- Data End ---

If you want to sort this file on a regular basis then you can prepare
a batch file with following command

--- Start of Batch File ----

REM Start of sorting program
REM navigate to the directory your file is saved.

c:
cd\
cd Text files

REM Below is starting command.
REM DataSort.txt is the output file where the sorted data will be stored.

sort Data.txt /o DataSort.txt

--- End of Batch File ----

This may help you to sort the data you require.
if you want more help on sorting command just typein "sort /?" on the
command prompt.

-- AMs
Subject: Re: PC Sort Utility
From: softballkid-ga on 21 Jul 2005 12:17 PDT
 
Hi AMS,

I did not know that was there. I checked out the help and there was
nothing there abouting sorting by two or more fields. These fields are
in different areas of the record. Again, I apologize for not
specifying this in my original request.

Thanks,
Softballkid1961
Subject: Re: PC Sort Utility
From: bamrish-ga on 21 Jul 2005 12:36 PDT
 
Hi Softballkid1961,
Well.. if with fields you are refereing to columns of data and if you
have fixed width data in your file, you can sort it by different
fields.

there is a /+n option for sort command, that starts sorting from the
nth charachter. so say you have the sencond field begining from the
10th charachter, then you can just specify /+10 and the data will be
sorted by the second field (column).

lemme know if you need more detail.

-- AMs
Subject: Re: PC Sort Utility
From: softballkid-ga on 21 Jul 2005 13:09 PDT
 
Hi AMS,

I saw that but I want to sort multiple fields or columns that are not
contiguous in the record.

Softballkid1961
Subject: Re: PC Sort Utility
From: manuka-ga on 25 Jul 2005 00:51 PDT
 
You can always simulate a multiple-column sort with multiple
single-column sorts. Start with your lowest-priority field and work
back to the highest-priority field. All you have to do is add extra
"sort" commands to the batch file.
Subject: Re: PC Sort Utility
From: eakerma-ga on 26 Jul 2005 12:06 PDT
 
http://unxutils.sourceforge.net/ contains a Windows implementation of
the Unix "sort" command.
Subject: Re: PC Sort Utility
From: softballkid-ga on 28 Jul 2005 06:57 PDT
 
eakerma,

I downloaded the utility zip but when I try to unzip it with WinZip it
gives me an error stating "it does not appear to be a valid archive".
Am I doing something wrong.

softballkid1961

Important Disclaimer: Answers and comments provided on Google Answers are general information, and are not intended to substitute for informed professional medical, psychiatric, psychological, tax, legal, investment, accounting, or other professional advice. Google does not endorse, and expressly disclaims liability for any product, manufacturer, distributor, service or service provider mentioned or any opinion expressed in answers or comments. Please read carefully the Google Answers Terms of Service.

If you feel that you have found inappropriate content, please let us know by emailing us at answers-support@google.com with the question ID listed above. Thank you.
Search Google Answers for
Google Answers  


Google Home - Answers FAQ - Terms of Service - Privacy Policy