I'm expecting to get all folders stated in %PATH%, yet I get only the first one. What is missing to get desired output?
for /f "delims=;" %%G in ("%PATH%") DO ( echo %%G )
Try with:
for %%a in ("%path:;=";"%") do @echo %%~a