I try to unzip a file via CMD.
So I install WinZip (and its plugin to cmd), WinRAR, and 7-zip.
But when I try to execute a command via the CMD:
7z e myzip.zip
It gives the next error:
7z is not recognized as an internal or external command
In addition, I added the folder of 7-z to the environment variables (Properties--> advanced --> Environment Variables --> user variable --> choose path, and add C:Program Files7-Zip
What can be the reason?
I find the below solution for this.
while zipping in cmd or git bash - getting error like
7z:command not found
solution:
- install 7z in your machine
- set the path in Environment Variables -> User Variables
- path -> edit -> new (add the path - C:ProgramFiles7-Zip) -> OK
Now to use 7z in git bash -
- Go to C:Program Files7-Zip and copy 7z.exe file
- Go to C:Program FilesGitusrin and paste 7z.exe file
Now, you will be able to use 7z with Git Bash
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…