Technology in terms you understand. Sign up for the Confident Computing newsletter for weekly solutions to make your life easier. Click here and get The Ask Leo! Guide to Staying Safe on the Internet — FREE Edition as my thank you for subscribing!

How do I get Windows Explorer to sort in the correct order?

I’m using Windows XP with Service Pack 3. For quite some time now, when I
open up a folder with my computer, 70% of the time, the files and folders are
listed reverse alphabetic order i.e. “loose” files arranged from Z to A and
then the numbers. Similarly with the folders. However if I open a folder with
Word or Excel, the order is in the usual A to Z order. What’s going on and how
can I stop the reverse order from occurring?

In this excerpt from
Answercast #80
, I look at ways to sort files in Windows Explorer and
application dialog boxes.

]]>

Windows Explorer sort order

So, it’s important to realize that when you open a folder with your computer, you’re opening it up in “Windows Explorer.”

When you open something in a program (like Microsoft Word or Microsoft Excel) that is not Windows Explorer, that is a file-open “dialog box” that is part of the application.

The controls, while they look similar, are actually completely different. They are completely separate with a completely separate set of behavior.

Sorting files in Windows Explorer

However, as it turns out, in this one respect, they are actually very similar.

If you take a look at the files in Details view (in other words, in Windows Explorer if you switch to View menu and then click on Details), you’ll get your list of files.

They may not be in alphabetical order. In fact, they may even be in some random order – and each of the column headings can be clicked.

Above the file name is a column heading that probably says something like File name. Click on that. That tells Windows Explorer to sort by that column. If it sorts in the wrong direction, click on it again. It will reverse the sort.

So, if the files are showing up sorted Z to A, click on the File name heading at the top of the list of file names – and it will resort in A to Z order.

Now the interesting thing here, of course, is that you can also sort by file size, by date, or by any of the other columns that are visible in Windows Explorer. Most of us think of doing it with the file name – because that’s what we’re used to looking for. We’re looking for the file names. But there are times when it’s handy to see which file is the largest or the smallest or the most recent.

That’s one quick way to do it. If you’re looking in a view that is other than the Details view, click over to the Details view, change the sort order and then click back to whatever view you were interested in and the sort order should be preserved.

Sorting in dialog boxes

The reason I say this is because Windows (or Excel and Word) File Open or Save dialog boxes also have column headers. Those column headers are also clickable and do the exact same kind of sorting that you can do with Windows Explorer.

(Transcript lightly edited for readability.)

Subscribe to Confident Computing! Tech problem solving & safety tips & a weekly confidence boost in your inbox every week.

I'll see you there!

10 Reasons Your Computer is Slow

Slow Computer?

Speed up with my special report: 10 Reasons Your Computer is Slow, now updated for Windows 10.

NOW: name your own price! You decide how much to pay -- and yes, that means you can get this report completely free if you so choose. Get your copy now!

2 comments on “How do I get Windows Explorer to sort in the correct order?”

  1. This was a good explanation of sorting files. The user probably will also be interested in your guide to “get Windows Explorer to display details by default,” which is linked in the “You may also be interested in:” section. This will prevent the reverse alphabetical order in all other folders.

    Reply
  2. I remember that on my previous computer running WinXP I sometimes had the same problem: Windows Explorer sorted the files on something different than filenames. However, sorting them correctly by means of the column headers only helped for that session, the next time I opened Explorer they would be wrongly sorted again!
    Searching the internet for this problem revealed a tip that worked: sort correctly by means of the column header, then close Explorer by clicking the ‘close’ button (the red cross at the top right) WHILE AT THE SAME TIME HOLDING THE CTRL BUTTON! (that is: do a ctrl-close). Next time Explorer opens it will be sorted correctly.
    Btw I have never encountered this strange sort behaviour in Win7, so I don’t know if this solution works there too if it might ever happen.

    Reply

Leave a reply:

Before commenting please:

  • Read the article.
  • Comment on the article.
  • No personal information.
  • No spam.

Comments violating those rules will be removed. Comments that don't add value will be removed, including off-topic or content-free comments, or comments that look even a little bit like spam. All comments containing links and certain keywords will be moderated before publication.

I want comments to be valuable for everyone, including those who come later and take the time to read.