Reputation: 45
I'm using the Compress-Archive command to zip the content of a folder and I need to delete the compressed files on the original folder afterwards. Is there an option on the command to do so ?
Upvotes: 0
Views: 5901
Reputation: 804
What boxdog said. Compressing the archive using Compress-Archive makes a different file name i.e compressedfoo.dir -> compressedfoo.zip. So You can just delete the original file using Remove-Item cmdlet and specifying the original filepath
Upvotes: 1