Saturday, May 30, 2015

How to upload thousands of photos from different folders, to Google Photos, in one go?

Finally I got something to share which is not related to SharePoint at all.  :-)

Google just announced that they allow users to upload unlimited photos

This is crazy idea. But, if it can help Google's market value to rise for 1%, then they actually got 4 Billion USD, which is more than enough to purchase hard disks. And, if they can grab some market share from Facebook, or even beat Instagram, then they actually got much more than 40 Billion USD!

So, maybe this aggressive strategy will succeed.

Anyway, I want to try it.

I have around 40GB photos, which are stored in thousands of folders. When trying to upload them to Google Photos, it seems that I can only upload the files in one folder in one go.

That's annoying. I don't want to upload the photos in thousands of batches.

So, below is the PowerShell script to copy the photos to a cache folder, and change the file name with unique string. I concatenate the parent folder name and the file name to get the string, which is enough to keep it unique in my case. It's easy to add "modified date" to the file name if necessary.


Get-ChildItem –Path E:\Photo\PhotoDVD\PhotoDVD1\* -Include *.jpg -Recurse | % { Copy-Item -Path $_.FullName -Destination "C:\GooglePhotos\$($_.Directory.Name).$($_.Name)" -Recurse -Force -Container }



No comments:

Post a Comment