0

I have a bunch of PDF invoices in a folder. They are named according to their dates. For example:

28-02-13.pdf

28-02-14.pdf

28-03-13.pdf

28-06-13.pdf

29-11-13.pdf

30-04-13.pdf

30-04-14.pdf

31-03-14.pdf

I want to sort them by the date. Problem is, when I choose sort by name, it gets sorted numerically, as you can see above.

Is there a way I can have windows sort my invoices according to date?

3
  • 1
    If the "date modified" attribute and the file names "per-se" are in accordance, you may want to sort them by this attribute. Oct 6, 2014 at 16:07
  • Yeah, problem is they're not in accordance... Oct 6, 2014 at 16:23
  • You can't sort the file names "by date", since a file name is not a date; even if your brain can interpret it as one, the computer can't. ;) Oct 6, 2014 at 19:51

2 Answers 2

2

If you could rename your file for numerically sorting such as YYMMDD (eg 140331.pdf instead of 31-03-14.pdf) it would make things easy.

But if the name is the date, sorting by date should not be a problem...

4
  • Reversing the date order is quite a good idea. Although I didn't understand what you wrote in the second sentence. Oct 6, 2014 at 16:22
  • 2nd sentence I read it as what I said in my comment. Oct 6, 2014 at 16:25
  • 1
    you wrote: I want to sort them by the date. Problem is, when I choose sort by name. What happens when you sort by date?
    – KitKatNeko
    Oct 6, 2014 at 17:06
  • Sort by date sorts it by date modified or created; I want to sort them according to the dates on the invoices. Oct 6, 2014 at 20:05
1

Maybe not the answer you're looking for, but by far the simplest way to get anything to correctly sort by date is to use YYYY-MM-DD format, or YY-MM-DD if you don't need to go back before the year 2000.

Your list would then be...

13-02-28
13-03-28
13-06-28 etc...

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .