Velvet Star Monitor

Standout celebrity highlights with iconic style.

news

7-Zip not working from the DOS prompt or command line?

Writer Sophia Terry

I have 7-Zip installed, and it works from Windows, but not from the DOS prompt or command line:

7z e max_logs_can_messages.tgz

Yields:

'7z' is not recognized as an internal or external command,
operable program or batch file.
3

5 Answers

You'll need to add the binary to your machine's PATH

See more here:

2

You can either copy 7-Zip to a well-known path like these:

C:\Windows\system32
C:\Windows
C:\Windows\System32\Wbem

or you call 7-Zip with the full path:

C:\Program Files\7-Zip\7z.exe

Or you do the thing Screenack said ;)

1

You need to register 7-Zip as a system PATH environment variable. An easy way to do this in Windows 7 & 8 is to run this from the command line:

setx path "%path%;C:\Program Files\7-Zip"

You need to add the 7-Zip folder to your PATH:

setx /M path "%path%;C:\Program Files\7-Zip\"

Alternatively, for Easy 7-Zip:

setx /M path "%path%;C:\Program Files\Easy 7-Zip\"
2

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:\Program Files\7-Zip) -> OK

Now to use 7z in git Bash

  • Go to C:\Program Files\7-Zip and copy 7z.exe file
  • Go to C:\Program Files\Git\usr\bin and paste 7z.exe file

Now, you will be able to use 7z with Git Bash

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy