Missing PDir option...

May 24, 2010
855
0
Northlake, Il
This is not a really a big deal given that it's easy enough to write a user-defined function to provide this information, but shouldn't PDir have a field code that is the opposite of the "/NL" (No-Link") option on the "Dir" command; i.e. something that means "Link"? (If it has one already please forgive me; I can't find it but then I have poor eyesight...)
 
May 20, 2008
3,515
4
Elkridge, MD, USA
mathewsdw:
| This is not a really a big deal given that it's easy enough to write
| a user-defined function to provide this information, but shouldn't
| PDir have a field code that is the opposite of the "/NL" (No-Link")
| option on the "Dir" command; i.e. something that means "Link"? (If it
| has one already please forgive me; I can't find it but then I have
| poor eyesight.)

The PDIR command, when using NO options, does report the target of junctions. (I run WinXP, which has only junctions, not symlinks). If you explicitly enumerate the reporting fields, you can include @junction[*] or @symlink[*] as a reporting field. The function you requested is thus already a built-in.

I had requested that - similar to field code R being equivalent to specifying @CRC32 - field codes be made available to represent the @INODE and @LINKS functions, but Rex rejected it with the comment (IIRC) they are not used frequently enough.
--
Steve
 
May 24, 2010
855
0
Northlake, Il
The PDIR command, when using NO options, does report the target of junctions. (I run WinXP, which has only junctions, not symlinks). If you explicitly enumerate the reporting fields, you can include @junction
[*] or @symlink
[*] as a reporting field. The function you requested is thus already a built-in.

I had requested that - similar to field code R being equivalent to specifying @CRC32 - field codes be made available to represent the @INODE and @LINKS functions, but Rex rejected it with the comment (IIRC) they are not used frequently enough.
--
Steve

Thank you for your response, Steve, but I am aware that those two functions exist, the problem is that it is two functions!!! And the function that I wrote that I referred to in my original request does nothing more than combine the outputs of the @Junction and @SymLink functions in an @If function; I do not care whether it is a junction or symbolic link; I only care that it is linked and where-to (just like in the "dir" and "pdir" commands with no field-code options); and again, this not a real big deal, just a minor (and rather silly in my eyes) irritation...
 
May 20, 2008
3,515
4
Elkridge, MD, USA
---- Original Message ----
From: mathewsdw
| Quote:
| Originally Posted by Steve Fabian
| The PDIR command, when using NO options, does report the target of
| junctions. (I run WinXP, which has only junctions, not symlinks). If
| you explicitly enumerate the reporting fields, you can include
| @junction[*] or @symlink[*] as a reporting field. The function you
| requested is thus already a built-in.

Thank you for your response, Steve, but I am aware that those two functions exist, the problem is that it is two functions!!! And the function that I wrote that I referred to in my original request does nothing more than combine the outputs of the @Junction and @SymLink functions in an @If function; I do not care whether it is a junction or symbolic link; I only care that it is linked and where-to (just like in the "dir" and "pdir" commands with no field-code options); and again, this not a real big deal, just a minor (and rather silly in my eyes) irritation...
---- End of Original Message ----

I fully agree with your frustration. I don't (yet) have access to TCC on Vista or 7, thus I have not tested %@junction[symbolic_link], but assuming that it is analogous to @symlink behavior (i.e., if @junction's parameter is anything else than a junction, the function value is an empty string), you could simply create a UDF (see linked_to below) whose value is the concatenation of these two functions, without the need to use @if. I presume this is functionally equivalent to the UDF you created. Alternately, you can just use the @truename function, but beware of its use on a mapped network drive.

function linked_to=`%@symlink[%1]%@junction[%1]`

BTW, please do not quote the signature line - when posts are replied to by email, the email client truncates the response at the signature mark. I had to copy your response manually.
--
Steve
 
May 24, 2010
855
0
Northlake, Il
I fully agree with your frustration. I don't (yet) have access to TCC on Vista or 7, thus I have not tested %@junction[symbolic_link], but assuming that it is analogous to @symlink behavior (i.e., if @junction's parameter is anything else than a junction, the function value is an empty string), you could simply create a UDF (see linked_to below) whose value is the concatenation of these two functions, without the need to use @if. I presume this is functionally equivalent to the UDF you created. Alternately, you can just use the @truename function, but beware of its use on a mapped network drive.

--- Dan

function linked_to=`%@symlink[%1]%@junction[%1]`

BTW, please do not quote the signature line - when posts are replied to by email, the email client truncates the response at the signature mark. I had to copy your response manually.
--
Steve
Your are, of course, correct. However, the function I wrote outputs a string of dashes ("-------------------") when the given directory is not a junction or symbolic link which makes it a bit more than a simple concatenation of @SymLink @Junction, but, as you can probably tell, I was completely willing to give that up, and would have been useful in the UDF that I did write! And I must admit I completely forgot about the "@TrueName" function, which is a very good idea, and since this is strictly a "home" computer and therefore does not have any access to "network drives", that's not an issue.

And I'm sorry, but I really don't understand your comment about "quoting the signature line", and I hope I'm not doing it again here! Please further explain so I can avoid doing that to you (or other people) again...

--- Dan
 
Jan 19, 2011
604
14
Norman, OK
And I'm sorry, but I really don't understand your comment about "quoting the signature line"
Signature lines are where you sign your message. In your case it would be
and in Steve's it's
When quoting, try to quote only the pertinent portion of the message. It also enhances understanding.
 
Similar threads
Thread starter Title Forum Replies Date
Jay Sage Documentation Function @DRIVE Missing in Help Lists Support 0
FreezerBurnt "Missing SETLOCAL" when initializing Visual Studio Command Prompt. Support 9
A Key Commands missing? Support 3
L How to? Shebang, nice idea but am I missing something? Support 4
A How to? TCMD Configuration Dialog: 'Smooth Scrolling' Option missing? Support 1
Z Take Command deletes the next letter when I insert a missing letter ? Support 5
Joe Caverly Missing PSHELL in HELP Support 0
JohnQSmith Weird DIR output (missing lines) Support 1
dcantor Documentation SET /T: missing from heading Support 0
M Is STDVCL40.DLL missing or no longer needed? Support 4
vefatica Missing DLL Support 21
E Fixed SHRALIAS doesn't work / SHRALIAS.EXE is missing in v20.11.35 Support 2
vefatica Fixed Help @FUNCTION, missing paragraph Support 8
vefatica Missing post and security error Support 4
Roedy missing English.dll, failed install Support 2
D MSVCP140.dll is missing Support 5
C WAD Logging missing Support 19
H Fixed ... MSVCR120.dll is missing from your system ... Support 2
vefatica Help pages, icon missing Support 8
J The triple mystery of the missing tray icon Support 9
L Full Screen in Office 2013 theme chars missing Support 8
vefatica Build 55: ipworks9.dll missing Support 8
S How to? How do I distinguish missing source file from download error when using HTTP? Support 6
S Documentation "HELP IDE" - missing reference Support 0
vefatica Missing VirtualizerSDK32.dll Support 8
Dan Glynhampton Documentation v15 help: Missing link Support 0
M Missing PERL command-line arguments Support 1
Dan Glynhampton Documentation Bad Link/Missing Page in v15 help Support 0
S Missing thread Support 9
S dir for ftp connection - missing files sometimes Support 1
R CompleteAllFiles missing in option? Support 1
Joe Caverly Sort-of Missing Switch for START in Help Support 7
M How to? Missing closing quote: What am I doing wrong???? Support 7
dcantor SENDMAIL /= missing field Support 4
S DEL on FTP site : complaint about missing DESCRIPT.ION Support 1
Steve Pitts FOLDERMONITOR missing events?? Support 7
rnwolf can't start because ipworks8.dll is missing Support 1
thedave Newly created directories missing from TCMD Support 0
dcantor Missing help for @PIDCOMMAND[pid] Support 6
dcantor @TIMEZONE missing from help Support 4
C Rex: Missing email messages from all forums Support 7
L Vista 64 bits missing commands Support 1
Phileosophos PDIR to list filenames without extensions? Support 2
vefatica PDIR and streams Support 1
vefatica PDIR with fixed-width unqualified filename? Support 2
W pdir returns diff results between tcc and tcmd - one is an error msg Support 5
thedave pdir /s Support 2
Emilio III pdir /f switch Support 1
D pdir ignores pm Support 2
WadeHatler pdir broken in 19.1 for directories with spaces Support 1

Similar threads