Skip to content

Instantly share code, notes, and snippets.

@RobbWatershed
Created March 30, 2023 17:01
Show Gist options
  • Save RobbWatershed/2f1229a2efcbdb7a802042be93723a8d to your computer and use it in GitHub Desktop.
Save RobbWatershed/2f1229a2efcbdb7a802042be93723a8d to your computer and use it in GitHub Desktop.
Mass-archiving Powershell command
Get-ChildItem -Directory -Path '[Path to Hentoid Library root]\[source folder]\' | ForEach-Object { $name = "[Output path]\$(Split-Path -Leaf $_).zip"; if(-not(Test-Path -Path $([Management.Automation.WildcardPattern]::Escape($name)))) {& 'C:\Program Files\7-Zip\7z.exe' a "$name" "$_\*" -mmt=on} }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment