Sort Folders by Last Characters of Name in Windows 7

sortingwindows 7

I have a stack of client folders with names like this:

eastcoal 008
mee 022
orr 047
owaka 032
owen 025
powernet006
redpath 031

Normally this works, but sometimes I'd like to sort by the number. So how can I sort folders
by the last characters in the folder string? Characters will always be three consecutive
numbers, and will run from 001 to 999 (until I've done a thousand jobs, which will take
years).

Best Answer

This can be done from a command prompt, but I can't think of any way to do it in Explorer.

Name the folders name.### where ### is a three digit number. For example, I created these folders.

ann.023 
bob.002 
fred.001 
harvey.012

From a command prompt or in Explorer the names will sort based using the first character, etc.

C:\test>dir
 Volume in drive C has no label.
 Volume Serial Number is 60B7-B1BA

 Directory of C:\test

2013-03-25  10:21 PM    <DIR>          .
2013-03-25  10:21 PM    <DIR>          ..
2013-03-25  10:21 PM    <DIR>          ann.023
2013-03-25  10:21 PM    <DIR>          bob.002
2013-03-25  10:21 PM    <DIR>          fred.001
2013-03-25  10:21 PM    <DIR>          harvey.012

From a command prompt you can also sort by extension (the part after the .) using dir /oe which gives this result.

C:\test>dir /oe
 Volume in drive C has no label.
 Volume Serial Number is 60B7-B1BA

 Directory of C:\test

2013-03-25  10:21 PM    <DIR>          ..
2013-03-25  10:21 PM    <DIR>          .
2013-03-25  10:21 PM    <DIR>          fred.001
2013-03-25  10:21 PM    <DIR>          bob.002
2013-03-25  10:21 PM    <DIR>          harvey.012
2013-03-25  10:21 PM    <DIR>          ann.023

That's only a partial solution as you have to go to the command prompt to get the alternate sorting method. However, if you only need to do it occasionally then perhaps it's good enough.

Related Question