Forum Discussion

VictorLanso's avatar
VictorLanso
Copper Contributor
Sep 01, 2022
Solved

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.

 

 

Resources