SyntaxFix
Write A Post
Hire A Developer
Questions
for /f iterates per line input, so in your program will only output first path.
for /f
your program treats %PATH% as one-line input, and deliminate by ;, put first result to %%g, then output %%g (first deliminated path).
;