Skip to content

Instantly share code, notes, and snippets.

@deltaepsilon
Created October 25, 2022 14:32
Show Gist options
  • Save deltaepsilon/41756e1a286bd271d2d07402dbabfb98 to your computer and use it in GitHub Desktop.
Save deltaepsilon/41756e1a286bd271d2d07402dbabfb98 to your computer and use it in GitHub Desktop.
Get-ChildItem "C:\Users\chris\Downloads" -Filter *.zip |
Foreach-Object {
$name = $_.Name
$folderName = $name.Split('.')[0]
$folderPath = "C:\Users\chris\Downloads\takeout-in\$folderName\"
echo "Processing $folderPath"
New-Item $folderPath -type Directory
Expand-Archive $name -DestinationPath $folderPath
.\takeout-helper.exe -i "C:\Users\chris\Downloads\takeout-in" -o "\\Stego\home\Photos\GoogleTakeout" --divide-to-dates --guess-timestamp-from-filename
Remove-Item -Path $folderPath
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment