Welcome!

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

SignUp Now!

"pathlist" alias

Dec
238
2
I hate having to examine the %path% the usual way -- cluttered, barely human-readable. To view it with only one path shown per line, I use this alias: pathlist=echo %=n %@replace[;,%=n ,%path]

This starts by replacing every ";" in the %path% with "%=n" (a "newline") followed by a single space. The first characters following "echo" are: newline + single space. The display looks like:

C:\> pathlist

C:\Perl\site\bin
C:\Perl\bin
C:\Program Files (x86)\AMD APP\bin\x86_64
C:\Program Files (x86)\AMD APP\bin\x86
C:\TakeCommand
C:\Windows\system32
C:\Windows
[etc.]


Apologies if something like this has already been posted in some other thread. (Edit: the leading spaces don't appear above because, I guess, the forum software "eats" them before posting a message.)
 
Last edited:
Thanks for that one.

I have added it to my alias.lst file.

Joe
 
I also got extremely irritated with the idiotic Windows path-setting routine — I mean, is it still 1995 or something? Year after year the same thing: one tiny, cramped, single-line text field buried three or four dialog boxes deep. Ridiculous. So, after making a file 'pathlist.txt' that looks like the output of the "pathlist" alias, I added this to the startup script (which does not have a "setlocal" command):
Code:
echo  Loading path from %pathFile
set path=
do _thisline in @%pathfile
    set _thisline=%@trim[%_thisline]
    if "%_thisline" == "" ITERATE
    iff "%path" == "" then
      set path=%_thisline
    else
        set path=%path;%_thisline
    endiff
enddo

Editing the path no longer requires using that awful dialog box — or having to use "eset path," which is handy to have at the command line but is still pretty cluttered. I just have to edit the pathlist text file. (I see I should add to the above a test for whether a line contains only a semicolon.)
 
Do you mean the ControlPanel\System\Advanced\Environment dialog? There you only set it once (as opposed to every time you start TCC).

And if you do want to set it every time you start TCC, why not just a single line in TCSTART.BTM?
Code:
set path=%path;...;...
Editing TCSTART.BTM seems no harder than editing PATHLIST.TXT.

And you can do the equivalent of using the CP applet with a simple
Code:
set /u path=%path;...
 
I want to be able to see one path "item" per line. It makes reading the whole collection of them — and editing them — easy. This way, I have it all ways: path is loaded; path is configured easily; the whole thing is very readable. Long lines of semicolon-separated paths don't appeal to me. Just personal preference. And although it's true that it is set every time I start TCC, the fact that it's being set is completely invisible to me. It happens instantly and automatically. Now if this approach somehow forced me to do it manually every time I started the command processor — that'd be a different matter entirely.
 
Back
Top