On Windows, you don't even need Perl to get a readable path:
for %i in ("%path:;=" "%") do @echo %i
Produces this (for my path):
{C} > for %i in ("%path:;=" "%") do @echo %i "C:\usr\bin" "C:\Perl\bin" "C:\WINDOWS\system32" "C:\WINDOWS" "C:\WINDOWS\System32\Wbem" "c:\Program Files\Microsoft SQL Server\90\Tools\binn\" "C:\Documents and Settings\Administrator\My Documents\bin" {C} >
UPDATE: Use "set /?" at the command prompt to find out the new options for environment variable substitution (the %path:;=" "%). Basically, I wrap the %PATH% ENV var in double quotes and then replace all the semicolon separators with a double-quote, space, double quote. This effecitely puts double quotes around all the paths (so spaces won't give any troubles) and we use the for loop to list each newly double-quoted string
In reply to Re: Road to a readable path
by VinsWorldcom
in thread Road to a readable path
by wol
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |