7

zip is not recognized as an internal or external command

where can I find zip on my machine in order to run

'zip` cmd?

Elad Benda
  • 35,076
  • 87
  • 265
  • 471
  • Have you seen this? http://stackoverflow.com/questions/940582/how-do-i-zip-a-file-in-c-using-no-3rd-party-apis – Patrik Svensson Dec 05 '12 at 15:41
  • 1
    Did you install 7-zip, Winzip, or some zip you expect to run? Sounds like that error is your zip isn't in your path or is not installed. – AlG Dec 05 '12 at 15:44
  • Make sure that you have "zip" installed (nothing built into windows like that). Maybe you can post some code that shows us what you're doing? http://serverfault.com/questions/39071/does-windows-have-a-built-in-zip-command-for-the-command-line – Patrik Svensson Dec 05 '12 at 15:47
  • 7zip uses gzip not zip if you are specifically wanting zip – Josh Graham May 05 '21 at 01:20

5 Answers5

2

You need to install the aplication. Later, add the folder where is located to your system PATH environment variable.

Oscar
  • 13,594
  • 8
  • 47
  • 75
  • 1
    where does Zip and rar usually inatlled? – Elad Benda Dec 05 '12 at 18:59
  • It depends of your OS version, but usually in %PROGRAMFILES/winrar or WinZip. Left click on the program icon, goto properties and you''ll see the program path – Oscar Dec 06 '12 at 19:37
1
tar -cvzf  Your_deployment_package.zip files.py

Use tar -cvzf in start instead of zip will work for me.

  • Thanks, works for me too. Funny that you can use tar on Windows, but not zip. – johey Mar 01 '23 at 09:23
  • This command will create a TAR archive file, not a zip file. To create a zip file, add the (undocumented) -a flag. See this StackExchange answer: https://superuser.com/a/1473257/1066749 – bgh Aug 10 '23 at 14:31
0

I had to run a bat file which had zip command to be executed, I used to get "'zip' is not recognized as an internal or external command, operable program or batch file."

I went to http://stahlworks.com/dev/index.php?tool=zipunzip, downloaded zip.exe and set it in Environment variables, it is working for me now.

Xavi
  • 89
  • 6
0

The below method worked for me.

By default, Windows doesn't support zip command. Instead, install a third party software like 7-zip. If you are using npm, then copy the "7z.exe" to the folder where npm is installed. In my case, npm was installed under "C:\Users\user-name\AppData\Roaming\npm"

Vidya Sagar H J
  • 157
  • 1
  • 3
0

I use 7-Zip as my zip tool, and the name of its file is 7z.exe. Windows expects the name to be zip.exe, not 7z.exe. So, I renamed it to zip.exe and it did the trick. Don't forget to add the renamed file to environment variable path.

Mizile
  • 134
  • 1
  • 8