5

When I sort by title in Google Drive, I would like it to numerically go 1 → 2 → 3 … etc., but instead it goes 1 → 10 → 100 → 1000 → 1001 → 1002 … etc.

Is there any way to get it to do the first ordering? (Below is a screenshot of how it's ordered now.)

Note: I have Japan2013a (2).JPG, Japan2013a (3).JPG and so on also in the list.

screenshot of how its ordered now

8
  • The screenshot doesn’t show any abnormalities, as 1 < 10 < 1000 < 1001 < 1002 < 1003, so the sorting order is correct. Do you also have a picture named Japan2013a (2).JPG? And if yes, where is it? – Alex Dec 12 '13 at 9:06
  • 4
    If you want them to be ordered numerically, then add a leading zero: 0001, 0100. – Jacob Jan Tuinstra Dec 12 '13 at 9:07
  • 1
    @alex the japan2013a (2) is at the position 198>199>2>20>200. There are around 4000 photos so I do not know the exact position. – Devi Dec 12 '13 at 10:46
  • @jacob that would solve the problem but there are around 4000 photos, can you recommend a program to do that in bulk? – Devi Dec 12 '13 at 10:47
  • With Google Apps Script it is possible. This, would be more on topic for Stack Overflow though. – Jacob Jan Tuinstra Dec 12 '13 at 11:03
2

It has been indicated on the Google Product Forum that if you were to put leading 0's as placeholders it will sort properly.

So in @Gavin Hudson's example if you created files with names starting:

01, 02, 03, 04, 05, 06, 07, 08, 09, 10, 11

It would sort properly.

In the general case, you need to find out the order of magnitude of how many files you have overall (is it 10, 100, 1000, 10000, etc) - and use the number of zeros from that number at the start of the file-name. So in the example, because there are less than 100 files, you need the zero's from "10", ie only 1.

This is fine for manageable numbers of photos - but it could be very tedious for larger numbers.

0

Google Drive does organize your files/folders in a strange numerical way. For example, if you have 12 files it would appear as this:

1, 10, 11, 12, 2, 3, 4, 5, 6, 7, 8, 9,

The only way around this, that I know, is to avoid using numbers to list things.

1
  • 2
    That's not "strange". That's just sorting by string, rather than number. The string "10" comes after the string "1" and before the string "2". – ale Mar 6 '16 at 17:14

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.