Anna's notepad

Use Powershell to zip files from multiple sources

If you have a bunch of files that you want to combine into one zip file, but they're scattered in different folders, the only way to do that in File Explorer is to first copy all the files into one folder, then zip them from there. It's tedious and made me think there must be a better way. It turns out there is; you can use Powershell to zip the files and not have to touch the files themselves.

Assumed knowledge:

Compress-Archive -LiteralPath "File_path_and_name_1", "File_path_and_name_2", "File_path_and_name_3" -DestinationPath "Path_and_name_of_zip" -Update

#MS Powershell #zip