Questions tagged [compress-archive]

36 questions
0
votes
2 answers

Powershell - Compress files based on the contents of another zip file

I have a zip file that has to be extracted to a destination folder. Before I extract I want to backup ONLY the root files and the sub directories that will be replaces by extracting the zip file. Can I write up a script that will be find out the sub…
0
votes
1 answer

Windows-Powershell Compress-Archive: Whats the process order?

I have a simple "error.log" compression script and wanted to know in what order the Windows Powershell "Compress-Archive" command performs its actions, specifically when you move the compressed file to another Drive. So if i have $compress = @{ …
0
votes
0 answers

Compress-Archive command does not work over another npm command

The Compress-Archive command doesn't work for chain npm commands, For Ex: > npm run some_command && Compress-Archive src target
0
votes
3 answers

How can I loop through specific file names with the Compress-Archive command in Windows PowerShell?

I am not too familiar with Windows PowerShell (and Windows console commands in general), but I wish to write a batch file which can create sperated .zip archives from specific files in a folder, then delete all but the .zip files. So, I have a…
eleks1835
  • 3
  • 2
0
votes
0 answers

Output redirected from Get-ChildItem to Compress-Archive does not archive all files/preserve folder structure

GetChildItem "C:\foo\bar" -Recurse -File | where { $_.Name -notmatch '[a-zA-Z_0-9^0-9]*(.pl|.xap|.go|.zip|.py|.tar|.gz|.tgz)' } | Compress-Archive -DestinationPath "C:\archive\xyz.zip" When I execute the GetChildItem command without output…
unjankify
  • 190
  • 9
0
votes
0 answers

Out of Memory on Compress-Archive. Set Max Memory? Enable Garbage Collection? Exception of type 'System.OutOfMemoryException' was thrown

I have a problem in that my PowerShell Archive archive script crashes after consuming my entire machines memory using the Compress-Archive cmdlet. The for loop added below really helped by only dealing with a few files at a time, but I am still…
user711393
  • 41
  • 2
1 2
3