Remove-Item deletes files selected by an automation, but deletion should follow verification rather than an assumption that earlier archiving succeeded. A safer design checks each file against the archive before removing it. section 2.1.6
A reusable cleanup function can:
- Open the ZIP through System.IO.Compression and compare each filename and uncompressed size. section 2.1.6
