Google Photos does not allow the sorting of images by name in its albums (folders). Images can only be sorted by “oldest first”, “newest first” or “recently added”. In order to sort them by name you need to edit the album, manually drag them into order, and save the album.
A way to trick Google Photos to sort them by name would be to alter the EXIF dates so that the alphabetical sort order of the image file names corresponds to the sort order of their EXIF dates.
I use PhotoMill to watermark my images. It and similar products allow you to shift the EXIF capture date, but that is really a moot point as all that does is shift the original capture date, or a new capture date you establish, by the same amount for all the images in the batch.
Instead one must establish a new base date for the first image in a batch. The base date plus a increasing shift factor is then applied to each remaining image in the batch.
Each jpg I work with has four dates that need to be changed. The X’s represent the placement of other image file data.
XXXXXXXXXX2020:01:16 13:07:04XXXXXXXXXX2020:01:16 12:13:02XXXXXXXXXX2020-01-16T13:07:04XXXXXXXXXX2020-01-16T12:13:02XXXXXXXXXX
This is my first draft of a simple solution.
Allows a user to select a folder.
Creates a new folder in the selected folder’s parent folder to hold new date altered versions of the images so the originals are not overwritten.
Establishes a new base date as today’s date.
Loops through the images in the folder and replaces the four dates. The first image is given the base date while each remaining images have 1 additional day added.
For good measure the file creation and modification date are also changed.
This code causes a spinning beach ball in the Action event of Button so I’ve moved it into a thread with a timer updating a progress bar .
I’ve checked the EXIF information with several external tools and it seems to work; however, perhaps there is a more simple solution.
Although the images now have new dates Google Photos still does not sort all of them in the correct order. This is likely due to Google Photos algorithms being flawed. If one sorts images using “oldest first” and then switches to “newest first” the images should be exactly in opposite order, but they are not - which seems to indicate their sorting process is corrupted.
Dim F, FC As FolderItem Dim Count as Integer F = SelectFolder If F <> Nil then Window1.Title = F.Name Count = F.Count If Count > 0 then FC = F.Parent.Child("EXIF " + F.Name) If FC.Exists then FC.Delete Else FC.CreateAsFolder End If Window1.Title = F.Name Count = F.Count Dim F2, I as FolderItem Dim DoIt, DoIt2 as Integer Dim DS, S3, NewDate, S, S2(-1) as String Dim StreamIn as TextInputStream Dim StreamOut as TextOutputStream Dim CDate as New Date For DoIt = 1 to Count I = F.Item(DoIt) If I <> Nil and I.Visible = True and Right(I.Name, 4) = ".jpg" then StreamIn = TextInputStream.Open(I) S = StreamIn.ReadAll StreamIn.Close S2 = Split(S, "2020") S3 = S CDate.TotalSeconds = CDate.TotalSeconds + 86400 For DoIt2 = 1 to UBound(S2) DS = "2020" + Left(S2(DoIt2), 6) If Instr(DS, "-") > 0 then NewDate = Str(CDate.Year) + "-" + Str(Format(CDate.Month, "0#")) + "-" + Str(Format(CDate.Day, "0#")) Else NewDate = Str(CDate.Year) + ":" + Str(Format(CDate.Month, "0#")) + ":" + Str(Format(CDate.Day, "0#")) End If S3 = ReplaceAll(S3, DS, NewDate) Next F2 = FC.Child(I.Name) StreamOut = TextOutputStream.Create(F2) StreamOut.Write S3 StreamOut.Close F2.CreationDate = CDate F2.ModificationDate = CDate End If Next Else MsgBox "Folder is Empty!" End If Else //User Cancelled End If