Welcome!

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

SignUp Now!

WHICH /A and SYMLINK

Aug
2,058
83
In the "What's New in Version 30" section of the TCC Help file,
for the WHICH command,
it says;
If the command is a symbolic link and you used the /A option, WHICH will display the symbolic link for the executable.

So, if I have;
Code:
E:\Utils>dir filever.exe

 Volume in drive E is New Volume   Serial number is 2c1e:6e61
 Directory of  E:\Utils\filever.exe

2021-09-18   8:28     <SYMLINK>    filever.exe [E:\PBCC50\Samples\Util\filever.exe]
                   0 bytes in 1 file and 0 dirs.
...and I do;
Code:
E:\Utils>which /a filever.exe
filever.exe is an executable extension : start /pgm filever.exe
filever.exe is associated with : E:\Utils\filever.exe

Why is the symbolic link for the executable not being displayed?

Joe
 
E:\Utils>which /a filever.exe
filever.exe is an executable extension : start /pgm filever.exe
filever.exe is associated with : E:\Utils\filever.exe

Hmmm! That output seems odd. Why is it mentioning executable extensions and associations? In a similar set-up I see something quite different (and I don't see the target of the link).

Code:
v:\> d *.exe
2023-07-14  12:31     <SYMLINK>    tcc.exe [d:\tc30\tcc.exe]

v:\> which /a tcc.exe
tcc.exe is an external : V:\tcc.exe
 
That's because I have;
Code:
.*=start /pgm
as an environment variable.

If I unset .* I get the same as you;
Code:
E:\Utils>which /a filever.exe
filever.exe is an external : E:\Utils\filever.exe
...with no SYMLINK.

I cannot remember why I have set .*=start /pgm in my environment, but I've had it for many, many years.

At one time,
it solved a problem that I was having,
and I never removed it.

Joe
 
Now I remember.

It was so I did not have to type start /pgm file.ext all the time.

Joe
 
.*=start /pgm

Hmmm!! If that were actually working for *.EXE I'd expect it to have pretty dire consequences. Wouldn't that cause every explicitly-named EXE to start in a new console? You might have noticed that. I'll bet it wasn't working for *.EXE (doesn't here) even though WHICH saw it and that TCC was using the normal run_an_exe behavior.
 
Whenever I run an .EXE from the command line,
with set .*=start /pgm in the environment,
the .EXE is started in the same console.

That is, no new console is created.

Joe
 
Whenever I run an .EXE from the command line,
with set .*=start /pgm in the environment,
the .EXE is started in the same console.

That is, no new console is created.

Joe
Same here. But isn't that contrary to .*=start /pgm?
 
Back
Top
[FOX] Ultimate Translator
Translate