Welcome!

By registering with us, you'll be able to discuss, share and private message with other members of our community.

SignUp Now!

Split paths one per line

Aug
132
4
This is a handy little TPIPE command:

path | tpipe /replace=1,0,0,0,0,0,0,0,0,"[;=]","\r\n"

I use it as an alias via the command:

alias 'paths = path | tpipe /replace=1,0,0,0,0,0,0,0,0,"[;=]","\r\n"'

So I can use the path command to get the usual unreadable output or I can use paths to get a nice line-by-line dump.
 
cool. this works also with tccle:
Code:
(system)  C:\...\TCCLE13x64 >ver
 
TCC LE  13.04.62 x64  Windows 7 [Version 6.1.7601]
 
(system)  C:\...\TCCLE13x64 >alias ep
for /t";" %p in (%path) echo %p
 
(system)  C:\...\TCCLE13x64 >ep
C:\Program Files\JPSoft\TCCLE13x64
C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common
C:\oracle\oraclexe\app\oracle\product\10.2.0\server\bin
C:\Windows\system32
C:\Windows
C:\Windows\System32\Wbem
C:\Windows\System32\WindowsPowerShell\v1.0\
C:\Program Files\Intel\DMIX
C:\Program Files (x86)\Sysinternals
C:\Program Files (x86)\Tools\WinMerge
C:\Users\Frank\AppData\Local\Smartbar\Application\
 
this works also with tccle:

Also this:
Code:
C:\...\conf> echo %@replace[;,^n,%PATH]
C:\Windows\system32
C:\Windows
C:\Windows\System32\Wbem
C:\Windows\System32\WindowsPowerShell\v1.0
C:\bin\ATI Technologies\ATI.ACE\Core-Static
C:\bin\Tools
C:\bin64\JPSoft\TCMD
 
Back
Top