简体   繁体   English

我如何运行 zip 到 cmd,却找不到它?

[英]how can I run zip through cmd, where it's not found?

zip is not recognized as an internal or external command

where can I find zip on my machine in order to run我在哪里可以找到zip在我的机器上运行

'zip` cmd? '邮编'cmd?

You need to install the aplication.您需要安装该应用程序。 Later, add the folder where is located to your system PATH environment variable.稍后,将所在的文件夹添加到您的系统 PATH 环境变量中。

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."我不得不运行一个 bat 文件,它有要执行的 zip 命令,我曾经得到“'zip'不被识别为内部或外部命令、可运行的程序或批处理文件。”

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.我去了http://stahlworks.com/dev/index.php?tool=zipunzip ,下载了 zip.exe 并将其设置在环境变量中,它现在对我有用。

The below method worked for me.下面的方法对我有用。

By default, Windows doesn't support zip command.默认情况下,Windows 不支持 zip 命令。 Instead, install a third party software like 7-zip.相反,安装第三方软件,如 7-zip。 If you are using npm, then copy the "7z.exe" to the folder where npm is installed.如果您使用的是 npm,则将“7z.exe”复制到安装 npm 的文件夹中。 In my case, npm was installed under "C:\\Users\\user-name\\AppData\\Roaming\\npm"就我而言,npm 安装在“C:\\Users\\user-name\\AppData\\Roaming\\npm”下

I use 7-Zip as my zip tool, and the name of its file is 7z.exe.我使用 7-Zip 作为我的 zip 工具,它的文件名是 7z.exe。 Windows expects the name to be zip.exe, not 7z.exe. Windows 期望名称为 zip.exe,而不是 7z.exe。 So, I renamed it to zip.exe and it did the trick.所以,我将它重命名为 zip.exe,它成功了。 Don't forget to add the renamed file to environment variable path.不要忘记将重命名的文件添加到环境变量路径中。

tar -cvzf  Your_deployment_package.zip files.py

Use tar -cvzf in start instead of zip will work for me.在开始时使用 tar -cvzf 而不是 zip 对我有用。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 我在哪里可以找到 Windows Zip 安装程序中的 Artifactory 6.10.0? 因为在 JFrog 中我没有找到 - Where can I Found an Artifactory 6.10.0 in Windows Zip Installer? cause in JFrog i didn't found 如何通过cmd最大化特定窗口? (视窗) - How can I maximize a specific window through cmd? (Windows) 如何从另一个cmd窗口在现有cmd窗口上运行命令? - How can I run commands on existing cmd window from another cmd window? 如何让窗口sdk的setenv.cmd全局工作,而不是单个cmd窗口? - how can I make window sdk's setenv.cmd work globally, instead of a single cmd window? 如何制作一个可以在python3.x中运行cmd命令的程序 - How can I make a program that can run cmd commands in python3.x 每次运行 python 脚本时,如何打开 cmd window ? - How can I open a cmd window everytime I run a python script? 通过PowerShell运行a.cmd文件 - Run a .cmd file through PowerShell 如何使用 c++ 代码通过 cmd 发送 email? - How can i send an email through cmd using c++ code? 如何使用 Windows cmd 使用 where 查找文件夹路径? - How can I use Windows cmd to find a folder path using where? 给定一个包含cmd命令的文本文件,我如何使用批处理文件循环并运行它们? - Given a text file containing cmd commands, how can I use a batch file to loop and run them?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM