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 循环来对 %PATH% 变量中的每个路径进行一些操作。但是 FOR 将 %PATH% 视为一行,并且只对整个变量进行一次迭代。如何解析 %PATH% 中每个目录的路径?
for %G in ("%path:;=" "%") do @echo %G
从:
http://ss64.com/nt/path.html