0

Some CLI commands work from only specific folders; I want to make them run globally, from anywhere.

I installed redis-cli.exe in the path c:/redis/redis-cli.exe.
Now when I open a cmd in c:/redis/ and run redis-cli ping, it works.
However, if I run it from some other folder, it throws an error saying
'redis-cli' is not recognized as an internal or external command, operable program or batch file.

In contrast, Chocolatey or npm runs from a cmd console opened in any folder.

Bojan Krkic
  • 349
  • 3
  • 10

1 Answers1

0

Solution: Add the path to that exe in your environment variables.

So for c:/redis/redis-cli.exe, add the value c:/redis to PATH in your environment variables.

Bojan Krkic
  • 349
  • 3
  • 10