1

When I read How does "FOR" work in cmd batch file? , there is an expression "%PATH:;= %",I can't understand,how the for batch gets the every paths set.How to understand the expression "%PATH:;= %" in the batch.This expression is what kind of features in the windows batch.

Thanks a lot!

Community
  • 1
  • 1
Ulysses Ma
  • 25
  • 4

2 Answers2

2

The expression "%PATH:;= %" Means to replace all instances of ; in the environment variable %Path% with spaces

Matt Williamson
  • 6,947
  • 1
  • 23
  • 36
1

this produces a result with replaced ; in %PATH% variable with spaces... here's the part of set /? that explains it:

Environment variable substitution has been enhanced as follows:

    %PATH:str1=str2%
npocmaka
  • 55,367
  • 18
  • 148
  • 187