Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
当我阅读“FOR”如何在 cmd 批处理文件中工作时?,有一个表达式“%PATH:;= %”,我看不懂,for批处理如何获取每个路径集。如何理解批处理中的表达式“%PATH:;= %”。这个表达式是windows批处理中有什么样的功能。
非常感谢!
表达式 "%PATH:;= %" 表示替换 ; 的所有实例 在带有空格的环境变量 %Path% 中
这会产生一个结果,用空格替换 ;%PATH% 变量......这set /?是解释它的部分:
;
set /?
Environment variable substitution has been enhanced as follows: %PATH:str1=str2%