I need to make a FOR loop to do some operations with each path in %PATH% variable. But FOR sees %PATH% as one line and makes only one iteration for the whole variable. How can I parse every directory's path in %PATH%?
Asked
Active
Viewed 260 times
0
-
Use a semi-colon as your delimiter in your `FOR` loop? – LittleBobbyTables - Au Revoir Nov 02 '12 at 18:02
-
I tried, but I don't know how many directories are in %PATH% – michaeluskov Nov 02 '12 at 18:06
1 Answers
1

kichik
- 33,220
- 7
- 94
- 114
-
1This will not work if PATH contains some paths that are already quoted. http://stackoverflow.com/q/5471556/1012053 has an answer that will always work. – dbenham Nov 02 '12 at 18:45