TheLastGimbus / GooglePhotosTakeoutHelper

Script that organizes the Google Takeout archive into one big chronological folder
https://aur.archlinux.org/packages/gpth-bin
Apache License 2.0
3.48k stars 176 forks source link

Need to run multiple times to move all files #253

Closed lkraider closed 9 months ago

lkraider commented 9 months ago

I am on the ios branch. For some reason, I had to run multiple times to move all the files from the full Takeout:

PS C:\Users\lkraider\Downloads\takeout> .\gpth.exe -i . -o ..\takeout-output\ --divide-to-dates --albums json
Okay, running... searching for everything in input folder...
Finding duplicates...
Guessing dates from files : ████████████████████████████████████████ 6845/6845
Finding albums (this may take some time, dont worry :) ...
Moving photos to output folder : ████████████████████████████████████████ 4018/4018
========================================
DONE! FREEEEEDOOOOM!!!

Last thing - I've spent *a ton* of time on this script -
if I saved your time and you want to say thanks, you can send me a tip:
https://www.paypal.me/TheLastGimbus
https://ko-fi.com/thelastgimbus
Thank you ❤
========================================
PS C:\Users\lkraider\Downloads\takeout> .\gpth.exe -i . -o ..\takeout-output-2\ --divide-to-dates --albums json
Okay, running... searching for everything in input folder...
Finding duplicates...
Guessing dates from files : ████████████████████████████████████████ 2827/2827
Finding albums (this may take some time, dont worry :) ...
Moving photos to output folder : ████████████████████████████████████████ 2786/2786
========================================
DONE! FREEEEEDOOOOM!!!

Last thing - I've spent *a ton* of time on this script -
if I saved your time and you want to say thanks, you can send me a tip:
https://www.paypal.me/TheLastGimbus
https://ko-fi.com/thelastgimbus
Thank you ❤
========================================
PS C:\Users\lkraider\Downloads\takeout> .\gpth.exe -i . -o ..\takeout-output-3\ --divide-to-dates --albums json
Okay, running... searching for everything in input folder...
Finding duplicates...
Guessing dates from files : ████████████████████████████████████████ 41/41
Finding albums (this may take some time, dont worry :) ...
Moving photos to output folder : ████████████████████████████████████████ 41/41
========================================
DONE! FREEEEEDOOOOM!!!

Last thing - I've spent *a ton* of time on this script -
if I saved your time and you want to say thanks, you can send me a tip:
https://www.paypal.me/TheLastGimbus
https://ko-fi.com/thelastgimbus
Thank you ❤
========================================
PS C:\Users\lkraider\Downloads\takeout> .\gpth.exe -i . -o ..\takeout-output-4\ --divide-to-dates --albums json
Okay, running... searching for everything in input folder...
...oh :(
...
I couldn't find any D: reasons for this may be:
  - your Takeout doesn't have any "year folders" -
    visit https://github.com/TheLastGimbus/GooglePhotosTakeoutHelper
    again and request new, correct Takeout
After fixing this, go ahead and try again :)
PS C:\Users\lkraider\Downloads\takeout>
lkraider commented 9 months ago

Can it be related to the duplicate files? I am looking into the JSON output and seems the filenames match in the outputs. For example, searching one file:

$ find takeout-output* -iname IMG-1467.jpg -exec md5sum {} \;
aa629bcbf6f3677825806a42e6ca4d96  takeout-output/ALL_PHOTOS/2023/04/IMG-1467.jpg
aa629bcbf6f3677825806a42e6ca4d96  takeout-output-2/ALL_PHOTOS/2023/04/IMG-1467.jpg
aa629bcbf6f3677825806a42e6ca4d96  takeout-output-3/ALL_PHOTOS/2023/04/IMG-1467.jpg

How to make sure they are all duplicates?

TheLastGimbus commented 9 months ago

Hi! Running multiple times may produce results such as yours - seeming that no all files where copied

All software is not foolproof, but, i can tell you for solid 80%, that i made gpth`s algorithms very carefully, and they really should be picking up everything

other consequence of that is that it always tries to do it's best to find any photos - that's why it may have found some left ones - previous gpth run have probably found them all, made relations between them, and deemed some of them unneccesary of moving etc

for example, the were duplicates, or there were inside some album, and you selected album option that doesn't touch them

(indeed, the json option that you selected makes relations between them, but only moves the main ones from "year folders")

So for now, I can for ~80% tell you to not worry, but if you want, you can try-hard to find out that it indeed didn't pick up everything - if so, I will call and emergency meeting ඞඞඞ