What does it mean to set a path? What is %PATH%?
Hello, this is Rcat.
This time, I will write about how to set a path so that it can be referenced in other articles.
Introduction
Terms of Service
Please check the terms of service in advance when using information or works.
https://note.com/rcat999/n/nb6a601a36ef5
About comments
Please check the terms of service guidelines before commenting.
What does it mean to set a path?
What is a path?
You generally don't need to worry about this when using a computer normally, but it is a list of where programs and commands are located so that you can launch them just by entering their name, which is mainly used when dealing with programs or commands..
Those reading this article might feel that they don't really understand commands. For example, here is an example of shutting down by executing a command from the Task Manager.

When you press the button to run a new task in the Task Manager, an input field appears, and you enter the name of the program here.
For example, if you want to shut down, you launch the program called "shutdown", so you enter that name.
However, since you need to specify whether it is a shutdown or a restart, and how many seconds later it should happen, some additional strings are added to the end.
Well, in short, to be able to execute it just by entering the name here, the path must be set for that program.
If not, it would result in "shutdown? What's that? Where is it?" and it wouldn't be able to execute.
By the way, the shutdown program is located in the following place.
C:\Windows\System32\shutdown.exe
And, the path is set here by default, and when displayed, it looks like the following.
>echo %PATH%
C:\Windows\system32;C:\Windows;続く...You can see that "C:\Windows\System32" is included.
In other words, it will automatically search whether a program named shutdown exists in this folder.
By the way, the "exe" at the end is automatically detected, so you don't need to include it when entering the command.
This is the effect of what is called a path.
And adding an arbitrary location to this list of folders is called setting a path.
How to set a path
Set a path
Please search for environment variables from the Start menu.

A screen like the one below will open suddenly, so please find Path in the user environment variables at the top and edit it.

Another screen will open; please create a new entry and enter the path of the folder you want to add to the path.
Click OK to close it and you are done.
For many programs, you do not need to set a path, or they do it automatically, but there are some slightly more advanced ones that do not, so in those cases, you need to perform this operation yourself.
For example, in the article below, you need to set a path because you need to use ffmpeg indirectly from other programs rather than directly.
Once you set the path, it will be recognized even if you enter it as a command as shown below.

Summary
In this article, I explained how to set a path.
This is not something you usually do in general usage, but it is knowledge that becomes essential once you start trying to do slightly more advanced things.
If an explanation tells you to set a path, it basically refers to this, so remember this and try it out.
See you next time.
いいなと思ったら応援しよう!
情報が役に立ったと思えば、僅かでも投げ銭していただけるとありがたいです。