zip is not recognized as internal or external command while creating zip command

Kakkan Sujitha 41 Reputation points
2023-02-28T13:58:39.9433333+00:00

Hi Team,

I'm following the exercise in this link where im trying to deploy an application to Azure app service. But im facing issue in the below step where im trying to create a zip folder.

**zip -r site.zip ***

The error message is "zip is not recognized as internal or external command".

Link : https://learn.microsoft.com/en-us/training/modules/host-a-web-app-with-azure-app-service/7-exercise-deploy-your-code-to-app-service?pivots=csharp

User's image

I tried following:

a. Installed 7-zip

b. Updated path in env variables

c. Trying changing command to 7z

Kindly help on how to create zip file with this command. Also wanted to know can we manually create a zip folder with all contents or the zip file created by this command is something different.

Azure App Service
Azure App Service
Azure App Service is a service used to create and deploy scalable, mission-critical web apps.
8,968 questions
Azure | Azure Training
{count} votes

Accepted answer
  1. Michael Taylor 60,326 Reputation points
    2023-02-28T16:17:08.8933333+00:00

    You're doing this in the sandbox right? The exercises are set up so you run the commands in the sandbox. The sandbox is set up and configured with the appropriate tools for the exercises. These commands won't work on your local machine without configuration.

    zip is not a standard Windows command. 7-zip doesn't use zip either. If you want the zip command available locally then you need to install the Powershell cmdlet for it. You can see the instructions here. Once you install it then you can do the same thing locally but note that the sandbox does other setup as well so don't expect this to work out of the box in all cases.


0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.