2

I am attempting to create a zip from from a folder using powershell 5 on Windows 10. After looking at this stackoverflow post I am trying out the Compress-Archive method.

When I Type in:

Compress-Archive -Path 'C:\Users\Test\demo' -DestinationPath 'C:\Users\Test\demo.zip' -verbose

I get a verbose error saying:

VERBOSE: The partially created archive file 'C:\Users\Test\demo.zip' is deleted as it is not usable.

I've looked everywhere online and I'm not able to find a solution to this. Anyone know whats going on?

Community
  • 1
  • 1
machinebit
  • 355
  • 3
  • 6
  • 17

2 Answers2

0

This message can appear if the folder you are compressing is empty.

Charlie Joynt
  • 4,411
  • 1
  • 24
  • 46
0

I had this same problem,

My path directory was holding a *, it was like

d:\somedirectory\*, I removed the * and it worked when it looked like d:\somedirectory

So my take is that you need to be extra careful when it comes to the path.

ximbal
  • 3,178
  • 2
  • 17
  • 19