1

In environment variables, I have multiple paths stored in PATH.

I would like to be able to print a single certain path.

Is it possible to print a path that contains a certain string? If not, how about printing only the first line in path?

Cutie
  • 53
  • 8
  • 1
    To print only the first line is easy, the PATH variable has only one line. – jeb Mar 10 '22 at 06:18
  • Oh. I mean the first path that is stored in Path. – Cutie Mar 10 '22 at 06:23
  • Then you should split the PATH into parts, see ['Pretty print' windows %PATH% variable - how to split on ';' in CMD shell](https://stackoverflow.com/a/5472168/463115) – jeb Mar 10 '22 at 06:28

0 Answers0