TechTalkz.com Home

Go Back   Windows Help & Support > Windows XP
Home Register Forum Rules FAQ User Blogs Gallery

Sorting files in a different order than alphabetical

Windows XP


Reply
 
LinkBack Thread Tools Display Modes
Old 03-19-2009, 04:30 PM   #1
ccdhofer
Guest
 
Posts: n/a
Default Sorting files in a different order than alphabetical

I'm wondering if there is a way to sort files within a folder by file name
other than alphabetical/numerical. My dilemma is that I will have folders
that will have 4 digit numbers that will be always preceeded by an "S" or a
"K". The numbers will also be followed by various letters, starting at
A,B,C, on and so on. For instance, examples of files would look like this:
S7054A; S7054B; S7054C; K7055A; K7055B;
S7056A..... I would like to have the actual 4 digit number (not including
the prefix letter) in numerical order, as shown in the example. If I sort by
name alone, it puts all of the "K" files first in numerical order, and then
the "S" files in numerical order after that. In essence, I would like the
files sorted numerically by the SECOND character in the file name. IS there
a way to do this? I will have MANY folders that will contain files such as
these. I am using Windows XP professional 2002.



Advertisement

  Reply With Quote
Old 03-19-2009, 04:30 PM   #2
BillW50
Guest
 
Posts: n/a
Default Re: Sorting files in a different order than alphabetical

In news:0D249377-A114-4ED7-8152-CC8F086768FF@microsoft.com,
ccdhofer typed onn Thu, 19 Mar 2009 08:50:11 -0700:
> I'm wondering if there is a way to sort files within a folder by file
> name other than alphabetical/numerical. My dilemma is that I will
> have folders that will have 4 digit numbers that will be always
> preceeded by an "S" or a "K". The numbers will also be followed by
> various letters, starting at A,B,C, on and so on. For instance,
> examples of files would look like this: S7054A; S7054B; S7054C;
> K7055A; K7055B;
> S7056A..... I would like to have the actual 4 digit number (not
> including the prefix letter) in numerical order, as shown in the
> example. If I sort by name alone, it puts all of the "K" files first
> in numerical order, and then the "S" files in numerical order after
> that. In essence, I would like the files sorted numerically by the
> SECOND character in the file name. IS there a way to do this? I
> will have MANY folders that will contain files such as these. I am
> using Windows XP professional 2002.


Sure there is always a way to do it. Although what program are you using
to sort? DIR, Windows Explorer, etc. Might have to write a script to
pull it off. Another idea is to use Bulk Rename (free) will easily
rename all of your filenames in no time flat to your liking.

--
Bill
Asus EEE PC 701G4 ~ 2GB RAM ~ 16GB-SDHC
Windows XP SP2


  Reply With Quote
Old 03-19-2009, 04:30 PM   #3
Kelly
Guest
 
Posts: n/a
Default Re: Sorting files in a different order than alphabetical

After doing some research, I find this is because in Windows XP, any
numeric string is handled as a number, instead of sorting character by
character in the filename. So in your example, 000 equals 0. This is
actually a more logical way to sort when it comes to numeric strings - if
you create folders "1" thru "10" under Win2K, 10 will actually come between
1 and 2. On XP, it will sort "correctly" - ie, 10 comes after 9.

You can modify this behavior by modifying the following regsitry value:

Key:
HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\Curr entversion\Policies\Explorer.

Value Name: NoStrCmpLogical
Value Type: REG_DWORD
Value Data:
NoStrCmpLogical = 0 (default behavior in Windows XP)
NoStrCmpLogical = 1 (win2k behavior)

Incorrect Sort Order in Windows Explorer in Windows XP
http://support.microsoft.com/default...;EN-US;Q318872

The sorting method is changed in Windows XP. The method that is used for
sorting is described at the following MSDN Web site: StrCmpLogicalW Function

Change the Sort Order Back to W2K Style (Line 107)
http://www.kellys-korner-xp.com/xp_tweaks.htm

To use the Regedit: Save the REG File to your hard disk. Double click it
and answer yes to the import prompt. REG files can be viewed in Notepad by
right clicking on the file and selecting Edit.

Added info:

Sort All by Alphabet - Start Menu and Fav's (Line 196)
http://www.kellys-korner-xp.com/xp_tweaks.htm

--

All the Best,
Kelly (MS-MVP/DTS&XP)

Taskbar Repair Tool Plus!
http://www.kellys-korner-xp.com/taskbarplus!.htm


"ccdhofer" <ccdhofer@discussions.microsoft.com> wrote in message
news:0D249377-A114-4ED7-8152-CC8F086768FF@microsoft.com...
> I'm wondering if there is a way to sort files within a folder by file name
> other than alphabetical/numerical. My dilemma is that I will have folders
> that will have 4 digit numbers that will be always preceeded by an "S" or
> a
> "K". The numbers will also be followed by various letters, starting at
> A,B,C, on and so on. For instance, examples of files would look like
> this:
> S7054A; S7054B; S7054C; K7055A; K7055B;
> S7056A..... I would like to have the actual 4 digit number (not including
> the prefix letter) in numerical order, as shown in the example. If I sort
> by
> name alone, it puts all of the "K" files first in numerical order, and
> then
> the "S" files in numerical order after that. In essence, I would like the
> files sorted numerically by the SECOND character in the file name. IS
> there
> a way to do this? I will have MANY folders that will contain files such
> as
> these. I am using Windows XP professional 2002.
>
>


  Reply With Quote
Old 03-19-2009, 04:30 PM   #4
ccdhofer
Guest
 
Posts: n/a
Default Re: Sorting files in a different order than alphabetical

I use Windows Explorer to view and find files - this is where I would like
them sorted by second character - and I'm very much a novice computer user,
so I don't know too much about technical terms and inner workings of a
computer!!!

"BillW50" wrote:

> In news:0D249377-A114-4ED7-8152-CC8F086768FF@microsoft.com,
> ccdhofer typed onn Thu, 19 Mar 2009 08:50:11 -0700:
> > I'm wondering if there is a way to sort files within a folder by file
> > name other than alphabetical/numerical. My dilemma is that I will
> > have folders that will have 4 digit numbers that will be always
> > preceeded by an "S" or a "K". The numbers will also be followed by
> > various letters, starting at A,B,C, on and so on. For instance,
> > examples of files would look like this: S7054A; S7054B; S7054C;
> > K7055A; K7055B;
> > S7056A..... I would like to have the actual 4 digit number (not
> > including the prefix letter) in numerical order, as shown in the
> > example. If I sort by name alone, it puts all of the "K" files first
> > in numerical order, and then the "S" files in numerical order after
> > that. In essence, I would like the files sorted numerically by the
> > SECOND character in the file name. IS there a way to do this? I
> > will have MANY folders that will contain files such as these. I am
> > using Windows XP professional 2002.

>
> Sure there is always a way to do it. Although what program are you using
> to sort? DIR, Windows Explorer, etc. Might have to write a script to
> pull it off. Another idea is to use Bulk Rename (free) will easily
> rename all of your filenames in no time flat to your liking.
>
> --
> Bill
> Asus EEE PC 701G4 ~ 2GB RAM ~ 16GB-SDHC
> Windows XP SP2
>
>
>

  Reply With Quote
Old 03-19-2009, 06:30 PM   #5
Terry R.
Guest
 
Posts: n/a
Default Re: Sorting files in a different order than alphabetical

The date and time was Thursday, March 19, 2009 9:11:44 AM, and on a
whim, Kelly pounded out on the keyboard:

> After doing some research, I find this is because in Windows XP, any
> numeric string is handled as a number, instead of sorting character by
> character in the filename. So in your example, 000 equals 0. This is
> actually a more logical way to sort when it comes to numeric strings - if
> you create folders "1" thru "10" under Win2K, 10 will actually come between
> 1 and 2. On XP, it will sort "correctly" - ie, 10 comes after 9.
>
> You can modify this behavior by modifying the following regsitry value:
>
> Key:
> HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\Curr entversion\Policies\Explorer.
>
> Value Name: NoStrCmpLogical
> Value Type: REG_DWORD
> Value Data:
> NoStrCmpLogical = 0 (default behavior in Windows XP)
> NoStrCmpLogical = 1 (win2k behavior)
>
> Incorrect Sort Order in Windows Explorer in Windows XP
> http://support.microsoft.com/default...;EN-US;Q318872
>
> The sorting method is changed in Windows XP. The method that is used for
> sorting is described at the following MSDN Web site: StrCmpLogicalW Function
>
> Change the Sort Order Back to W2K Style (Line 107)
> http://www.kellys-korner-xp.com/xp_tweaks.htm
>
> To use the Regedit: Save the REG File to your hard disk. Double click it
> and answer yes to the import prompt. REG files can be viewed in Notepad by
> right clicking on the file and selecting Edit.
>
> Added info:
>
> Sort All by Alphabet - Start Menu and Fav's (Line 196)
> http://www.kellys-korner-xp.com/xp_tweaks.htm
>


Hi Kelly,

But will this assist the OP? They want to sort by 2nd character
(numeric), and the first character is a letter.


Terry R.
--
Anti-spam measures are included in my email address.
Delete NOSPAM from the email address after clicking Reply.
  Reply With Quote
Old 03-19-2009, 07:30 PM   #6
dadiOH
Guest
 
Posts: n/a
Default Re: Sorting files in a different order than alphabetical

Advertisement
ccdhofer wrote:
> I'm wondering if there is a way to sort files within a folder by file
> name other than alphabetical/numerical. My dilemma is that I will
> have folders that will have 4 digit numbers that will be always
> preceeded by an "S" or a "K". The numbers will also be followed by
> various letters, starting at A,B,C, on and so on. For instance,
> examples of files would look like this: S7054A; S7054B; S7054C;
> K7055A; K7055B;
> S7056A..... I would like to have the actual 4 digit number (not
> including the prefix letter) in numerical order, as shown in the
> example. If I sort by name alone, it puts all of the "K" files first
> in numerical order, and then the "S" files in numerical order after
> that. In essence, I would like the files sorted numerically by the
> SECOND character in the file name. IS there a way to do this? I
> will have MANY folders that will contain files such as these. I am
> using Windows XP professional 2002.


Your best bet is to rename the files so that the number precedes the "K",
"S" or whatever. For example, rename K7055A to 7055A-K or 7055A_K. Most
any bulk renamer can do this easily.

That would sort them the way you want but still keep your distinguishing
letter available. A potential difficulty arises if you were to have two
files named identically except for the letter; eg,
K7055A
and
S7055A
If renamed as I suggested, they would display as...
7055A-K
7055A-S

--

dadiOH
____________________________

dadiOH's dandies v3.06...
....a help file of info about MP3s, recording from
LP/cassette and tips & tricks on this and that.
Get it at http://mysite.verizon.net/xico




Advertisement

  Reply With Quote
Reply

Thread Tools
Display Modes



< Windows Help - MS Office Help >


New To Site? Need Help?

All times are GMT. The time now is 11:55 AM.


vBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Copyright © 2005-2008, TechTalkz.com. All Rights Reserved - Privacy Policy
Valid XHTML 1.0 Transitional