Hi. I'd like to make a batch file that loops over a semicolon separated path variable and displays each directory on a different line. I am having 2 problems trying to do this:
1. I am passing in the name of the path variable to loop over ("path", "classpath", etc). How can I expand that path in a variable. For example, in my batch file, %1 = "path". How can I assign the contents of %path% to a variable. I don't want to test if "%1" = "path" as I want this to be flexible enough to handle any path variable (I have a lot of them).
2. How can I loop over a semicolon separated string and display each path on a separate line. I've been playing with "for /f" quite a bit, but haven't figured out how to manipulate the tokens and delimiters keywords.
Thanks!