Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

'zip' is not recognized as an internal or external command, operable program or batch file. #22

Open
kmgalanakis opened this issue Feb 4, 2018 · 13 comments

Comments

@kmgalanakis
Copy link

kmgalanakis commented Feb 4, 2018

I'm on Windows 10 and even though I can run the zip command on my terminal, I keep getting this error

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

The path for the zip.exe is already included in my PATH.

Any clues why this happens?

@gitlost
Copy link
Contributor

gitlost commented Feb 4, 2018

Yes I do @kmgalanakis ! The framework needs changes to properly support Windows. In this case the issue is caused (ultimately) by the environment (in particular PATH) not being passed to proc_open(). Also this command should probably use the Extractor class anyway instead.

@kmgalanakis
Copy link
Author

Minutes after posting the issue, I dug through the code and immediately noticed the issue the proc_open. Is there any roadmap for that refactor?

@gitlost
Copy link
Contributor

gitlost commented Feb 5, 2018

Always the way isn't it?! The roadmap is here https://make.wordpress.org/cli/handbook/roadmap/ and as you can see is currently a bit vague but will hopefully be firmed up over the coming week or so...

@bondansebastian
Copy link

Experiencing the same issue, any updates ?

@wojsmol
Copy link
Contributor

wojsmol commented Aug 9, 2018

Hi
@bondansebastian This commend is not reedy yet for WP-CLI 2.. If you wont help as in converting it to new format see #26 and join as on slack in #cli channel.

@wojsmol
Copy link
Contributor

wojsmol commented Aug 9, 2018

@bondansebastian To be clear this command will by converted shortly.

@bondansebastian
Copy link

bondansebastian commented Apr 20, 2019

Hi @wojsmol
#26 has been closed, still the command doesn't work in windows machine.
I would be glad to help converting it, just need more information about what to fix.

@wojsmol
Copy link
Contributor

wojsmol commented Apr 20, 2019

@bondansebastian Command was converted to WP-CLI 2 structure. Please post wp --info output.

@bondansebastian
Copy link

@bondansebastian Command was converted to WP-CLI 2 structure. Please post wp --info output.

OS:     Windows NT 10.0 build 17134 (Windows 10) i586
Shell:  C:\Program Files\Git\usr\bin\bash.exe
PHP binary:     C:/xampp/php/php
PHP version:    7.1.15
php.ini used:   C:\xampp\php\php.ini
WP-CLI root dir:        C:\Users\Bondan\AppData\Roaming\Composer\vendor\wp-cli\wp-cli
WP-CLI vendor dir:      C:\Users\Bondan\AppData\Roaming\Composer\vendor
WP_CLI phar path:
WP-CLI packages dir:    C:\Users\Bondan/.wp-cli/packages/
WP-CLI global config:
WP-CLI project config:
WP-CLI version: 2.1.0

@luisvenezian
Copy link

Hi @kmgalanakis
Here's my solution to zip files using Windows 10 & PowerShell Scripts: InfoZip

  • Find download section: ftp://ftp.info-zip.org/pub/infozip/win32/
  • Find your file, there are many but i only needed this: ftp://ftp.info-zip.org/pub/infozip/win32/zip300xn-x64.zip
  • Put zip.exe path as a enviroment variable path and it's done!

After all you can zip everything by using zip destination.zip source
Try zip --help to see many others functions such as recursive zip into directories.

@kmgalanakis
Copy link
Author

@venezianluis I've already tried this. Didn't resolve my issue.

@Lazar014
Copy link

Lazar014 commented Feb 12, 2023

Hey people, any solution to this problem yet?
I am following a python pdf book for python beginners, making some backup app as homework and i am getting 'zip' is not recognized as an internal or external command, operable program or batch file.

@VoHoTv
Copy link

VoHoTv commented Jul 20, 2023

Is there any reason why the PHP ZipArchive is not used instead of relying on the system to have a zip command implemented?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

7 participants