Created
April 15, 2023 17:57
-
-
Save jessewolcott/35af044b46897eefcc3c2fbb5de759a3 to your computer and use it in GitHub Desktop.
Cleanup Wordpress Thumbnails
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$LocalImgFolder = "Path\To\jessewolcott.github.io\assets\img" | |
$Years = (Get-Childitem -Path $LocalImgFolder).Fullname | |
$ThumbNails = foreach ($Year in $Years){ | |
(Get-ChildItem -Path $Year -Recurse -Filter "*-*x*").FullName | |
} | |
foreach ($Thumbnail in $Thumbnails){ Remove-Item -Path $Thumbnail} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment