Forum Discussion
VictorLanso
Sep 01, 2022Copper Contributor
PowerShell Compress-Archive
I have a monthly backup folder which contains daily backup from 1st day of the month to the last day of the month. How can i use PowerShell to zip each backup into the same folder or another folder all at once. I want the backup zip on a daily basis.
Parent folder is C:\January2022>
Childitems C:\Jan-1 through Jan-30
PS C:\Users\IT\TestFolder1> compress-Archive *.* -destinationpath C:\testfolder3\Test.zip
Above zip all contents at once into test.zip but i want separate childitem zip into destination.
- Here you go: https://github.com/Raindrops-dev/RAIN-TechCommunityContributions/blob/main/Start-SubfolderCompression.ps1
Read the .Example code at the top for the parameters to use when calling the script.
No RepliesBe the first to reply