I have installed
curl and have set it as
environment variable in my system. But when running the
curl command its giving an error
'curl' is not recognized as an internal or external command, operable program or batch file.I tried restarting my system but is of no use.I want this to upload my application to
HockeyApp. Please help me out.I am using Windows 8.1.
I have installed
Steps to install curl in windows
Install cURL on Windows
There are 4 steps to follow to get cURL installed on Windows.
Step 1 and Step 2 is to install SSL library. Step 3 is to install cURL. Step 4 is to install a recent certificate
Step One: Install Visual C++ 2008 Redistributables
From https://www.microsoft.com/en-za/download/details.aspx?id=29 For 64bit systems Visual C++ 2008 Redistributables (x64) For 32bit systems Visual C++ 2008 Redistributables (x32)
Step Two: Install Win(32/64) OpenSSL v1.0.0k Light
From http://www.shininglightpro.com/products/Win32OpenSSL.html For 64bit systems Win64 OpenSSL v1.0.0k Light For 32bit systems Win32 OpenSSL v1.0.0k Light
Step Three: Install cURL
Depending on if your system is 32 or 64 bit, download the corresponding** curl.exe.** For example, go to the Win64 - Generic section and download the Win64 binary with SSL support (the one where SSL is not crossed out). Visit http://curl.haxx.se/download.html
Copy curl.exe to C:WindowsSystem32
Step Four: Install Recent Certificates
Do not skip this step. Download a recent copy of valid CERT files from https://curl.haxx.se/ca/cacert.pem Copy it to the same folder as you placed curl.exe (C:WindowsSystem32) and rename it as curl-ca-bundle.crt
If you have already installed
curl or after doing the above steps, add the directory where it's installed to the windows path:
1 - From the Desktop, right-click My Computer and click Properties.
2 - Click Advanced System Settings .
3 - In the System Properties window click the Environment Variables button.
4 - Select Path and click Edit.
5 - Append ;c:path to curl directory at the end.
5 - Click OK.
6 - Close and re-open the command prompt
TASKLIST does not set errorlevel.
echo off tasklist /fi "imagename eq notepad.exe" |find ":" > nul if errorlevel 1 taskkill /f /im "notepad.exe" exit
should do the job, since ":" should appear in
TASKLIST output only if the task is NOT found, hence
FIND will set the errorlevel to
not found and
taskkill /f /im "notepad.exe"
will kill a notepad task if it exists - it can do nothing if no notepad task exists, so you don't really need to test - unless there's something else you want to do...like perhaps
echo off tasklist /fi "imagename eq notepad.exe" |find ":" > nul if errorlevel 1 taskkill /f /im "notepad.exe"&exit
which would appear to do as you ask - kill the notepad process if it exists, then exit - otherwise continue with the batch
Thanks to an answer to Stack Overflow quesion Creating a file name as a timestamp in a batch job, I found that it was a space terminating the filename.
You have overridden the
PATH environment variable, so the command processor can no longer find the
The fix is nice and simple - just use a different variable name!
:: set path SET MyPath=M:\5.bmp :findfile IF EXIST %MyPath% (
Please note that if you genuinely wanted to set the
path environment variable, you should append to it like so:
REM Set temporarily for this session SET PATH=%PATH%;C:SomeFolder REM Set permanently (but note - this change will not be made to this session) SETX PATH=%PATH%;C:SomeFolder
I'm fairly certain that the
ls command is for Linux, not Windows (I'm assuming you're using Windows as you referred to
cmd, which is the command line for the Windows OS).
You should use
dir instead, which is the Windows equivalent of
Edit (since this post seems to be getting so many views :) ):
You can't use
cmd as it's not shipped with
Windows, but you can use it on other terminal programs (such as GitBash). Note,
ls might work on some
FTP servers if the servers are
linux based and the
FTP is being used from
Windows is similar to
ls. To find out the various options available, just do
If you really want to use
ls, you could install 3rd party tools to allow you to run
unix commands on
Windows. Such a program is
Microsoft Windows Subsystem for Linux (link to docs).