1

I downloaded the curl.exe file from the curl website and put it in my c drive. C:\curl.exe . How do I make that a shortcut in the command line?

For instance, instead of typing "C:\curl http://www.google.com", I would like to just type "curl http://www.google.com"

3 Answers 3

2

Put it in a directory that will be searched for by the command processor by adding it to the PATH environment variable.

For instance:

C:\Windows> set PATH=%PATH%;c:\

C:\Windows> curl "http://www.google.com"

This will work.

You can use the command path in the command prompt to get the current list of directories that are in the PATH.

Of course, I don't recommend putting curl.exe at the C:\ root, but in a more secure location, like in your personal directory C:\Users\YourName.

Sign up to request clarification or add additional context in comments.

Comments

1

You'll need to put curl.exe in a directory within your path, such as c:\WINDOWS\ (type PATH to see all the directories in your system path) or put it in its own directory, then add that directory to your path.

For example, if you put curl.exe within C:\Utils, you can add this directory to your path by typing:

SET PATH=%PATH%;C:\Utils

To make this permanent, go to Control Panel / System and Security / System, click on Advanced System Settings, click Environment Variables, and modify the "Path" variable under System Variables. Just stick ;C:\Utils at the end.

Comments

0

I figured it out. Instead of adding the curl.exe file to just C:\, i added it to the C:\Windows directory

1 Comment

Adding it to C:\Windows is a bad idea. That directory is owned by the OS. You should really put it into a user-owned directory such as a subdirectory of your user directory C:\Users\YourName.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.