SCF Advanced Search



Members
Stats
  • Total Posts: 41450
  • Total Topics: 14956
  • Online Today: 509
  • Online Ever: 51419
  • (01. January 2010., 10:27:49)









Author Topic: How to remove ALL Google Photos with 1 mass selection  (Read 7689 times)

0 Members and 1 Guest are viewing this topic.

devnullius

  • SCF VIP Member
  • *****
  • Posts: 3611
  • KARMA: 157
  • Gender: Female
    • SCForum.info
How to remove ALL Google Photos with 1 mass selection
« on: 01. April 2020., 17:51:06 »
It's 2020. Somehow, Google thinks it's dangerous for people to remove all their photos at once. And this is a major pita if you actually want to remove all images: it just can't be done and you'll spend the day selecting a few images at a time. This will not do!

Enter, Mohammed: https://support.google.com/photos/thread/197868?hl=en&msgid=37269386

Browser Console Script to run:
Code: [Select]
for(i = 1; i<=9999; i++) {
    console.log("Iteration # --> " + i);
    document.querySelectorAll('div[role=checkbox]').forEach(div=>div.click());
    document.querySelectorAll('div[aria-label*="Select all photos"]').forEach(div=>div.click());
    await new Promise(r => setTimeout(r, 3000));
try{console.log("Selected documents count for iteration [" + i + "]: " + document.evaluate('/html/body/div[1]/div/c-wiz/c-wiz[2]/span/div[1]/div/span', document, null, XPathResult.FIRST_ORDERED_NODE_TYPE, null).singleNodeValue.innerText);}catch(ex){/*do nothing*/}
    document.querySelector('button[title=Delete]').click();
    await new Promise(r => setTimeout(r, 5000));
    document.evaluate('//span[text()="Move to trash"]', document, null, XPathResult.ANY_TYPE, null ).iterateNext().click();

    //wait for new images to load
    await new Promise(r => setTimeout(r, 10000));
}
More information about bitcoin, altcoin & crypto in general? GO TO  j.gs/7385484/btc

Cuisvis hominis est errare, nullius nisi insipientis in errore persevare... So why not get the real SCForum employees to help YOUR troubled computer!!! SCF Remote PC Assist http://goo.gl/n1ONa9

Samker's Computer Forum - SCforum.info

How to remove ALL Google Photos with 1 mass selection
« on: 01. April 2020., 17:51:06 »

devnullius

  • SCF VIP Member
  • *****
  • Posts: 3611
  • KARMA: 157
  • Gender: Female
    • SCForum.info
Re: How to remove ALL Google Photos with 1 mass selection
« Reply #1 on: 01. April 2020., 17:59:49 »
Code: [Select]
for(i = 1; i<=9999; i++) {
    console.log("Iteration # --> " + i);
    document.querySelectorAll('div[role=checkbox]').forEach(div=>div.click());
    document.querySelectorAll('div[aria-label*="Select all photos"]').forEach(div=>div.click());
    await new Promise(r => setTimeout(r, 3000));
try{console.log("Selected documents count for iteration [" + i + "]: " + document.evaluate('/html/body/div[1]/div/c-wiz/c-wiz[2]/span/div[1]/div/span', document, null, XPathResult.FIRST_ORDERED_NODE_TYPE, null).singleNodeValue.innerText);}catch(ex){/*do nothing*/}
    document.querySelector('button[title=Delete]').click();
    await new Promise(r => setTimeout(r, 5000));
    document.evaluate('//span[text()="Move to trash"]', document, null, XPathResult.ANY_TYPE, null ).iterateNext().click();

    //wait for new images to load
    await new Promise(r => setTimeout(r, 10000));
}

If the script throws above error, it means not all thumbnails are fully loaded. They need to be visible for the script to be able to detect them. Make your window a bit smaller or zoom in a bit instead of max zoom out.
More information about bitcoin, altcoin & crypto in general? GO TO  j.gs/7385484/btc

Cuisvis hominis est errare, nullius nisi insipientis in errore persevare... So why not get the real SCForum employees to help YOUR troubled computer!!! SCF Remote PC Assist http://goo.gl/n1ONa9

Betty Larson

  • Guest
Re: How to remove ALL Google Photos with 1 mass selection
« Reply #2 on: 04. April 2022., 18:39:31 »
The coding updates here are quite provoking to all. I hope that after the updates the various people are able to learn about and know how to fix and remove bugs.  Keep going with review resumeble work here please continue sharing.

Samker's Computer Forum - SCforum.info

Re: How to remove ALL Google Photos with 1 mass selection
« Reply #2 on: 04. April 2022., 18:39:31 »

 

With Quick-Reply you can write a post when viewing a topic without loading a new page. You can still use bulletin board code and smileys as you would in a normal post.

Name: Email:
Verification:
Type the letters shown in the picture
Listen to the letters / Request another image
Type the letters shown in the picture:
Second Anti-Bot trap, type or simply copy-paste below (only the red letters):www.scforum.info:

Enter your email address to receive daily email with 'SCforum.info - Samker's Computer Forum' newest content:

Terms of Use | Privacy Policy | Advertising