Done A suggested PDir option...

May 24, 2010
855
0
Northlake, Il
PDir, a very useful command that I almost couldn't live without, has, of course, options for file and directory names in any of several formats (SFN path, LFN path, etc.). But what it doesn't have, as far as I can tell, is an option to display for a directory symbolic link or junction the directory that that symbolic link or junction is pointing to, and that would be real handy for my current purposes, so much so that I am strongly considering other ways that I can get that information (batch files, executable programs, etc.) because I really need it, so much so that I can not achieve the goal that I am trying to achieve without that information. I have no strong opinion on whether directory symbolic links and junctions would be selected for output/displayed in different ways or one field option displaying both without distinction, with possibly yet another option to tell you whether it is a symbolic link or junction because I don't see any real, substantial reason, why it would matter. (And because my eyesight is bad and it's there and I am just not seeing it, I apologize and please reply with the information on how to get that data.)
 
May 20, 2008
3,515
4
Elkridge, MD, USA
---- Original Message ----
From: mathewsdw
To: ESFabian@zenge.org
Sent: Tuesday, 2011. March 29. 01:36
Subject: [Suggestions-t-2731] A suggested PDir option...

| PDir, a very useful command that I almost couldn't live without, has,
| of course, options for file and directory names in any of several
| formats (SFN path, LFN path, etc.). But what it doesn't have, as far
| as I can tell, is an option to display for a directory symbolic link
| or junction the directory that that symbolic link or junction is
| pointing to...

I have been using the ability of the command to pass report the value of variable functions, including user defined ones. I regularly use the built-in functions @JUNCTION, @INODE, @LINKS, @VERINFO, and the UDFs @RELFILE, @RELPATH (see below). I created aliases for all usual combinations (with a systematic naming convention).

relfile=%@quote[%@replace[%_cwds,,%@full[%&]]]
relpath=%@quote[%@replace[%_cwds,,%@path[%@full[%&]]]]

Try it, you might like it!
--
HTH, Steve
 
May 24, 2010
855
0
Northlake, Il
---- Original Message ----
From: mathewsdw
To: ESFabian@zenge.org
Sent: Tuesday, 2011. March 29. 01:36
Subject: [Suggestions-t-2731] A suggested PDir option...

I have been using the ability of the command to pass report the value of variable functions, including user defined ones....

Try it, you might like it!
--
HTH, Steve

Steve, thank you for your response and I didn't know about those functions, but they really don't help. I don't use junctions anymore, I strictly use symbolic links (a lot of them, and I don't know exactly why I use symbolic links vs. junctions other than the fact that they existed on other operating systems that I have used in past), and @Junction doesn't work for symbolic links. But it turns out that there is a "@SYMLINK" function that I (and maybe you) didn't know about and it returns exactly the information I'm looking for. However, I haven't tried it (because I no longer use junctions and don't believe I have any on this machine and I'm lazy), but I imagine it would quite easy to create a user-defined function that wraps "%Junction" and "@SymLink" in a "@If" function, and you it would probably even be easy to return a "not junctioned and not symbolically linked" value if it is the directory you are examining is not a junction or symbolic link.

- Dan
 
Similar threads
Thread starter Title Forum Replies Date
mfarah Done Alternative (on-the-fly?) COLORDIR settings for DIR, PDIR and SELECT. Suggestions 0
mfarah Done pdir /(k) for the output of the @CKSUM function. Suggestions 0
rps Done Add PDIR switches Suggestions 1
mfarah "Relative path" option for PDIR Suggestions 1
S Done Further enhancement of PDIR Suggestions 2
B Done PDIR Field Separator Option Request Suggestions 3
p.f.moore Done v10: PDIR sort on any field Suggestions 1
vefatica Done Option to suppress blank lines in WMIQUERY Suggestions 1
M Done SFTP with a public key auth option Suggestions 2
R Option to add tcc to Bash profile Suggestions 1
vefatica INI option to disable everything GUI ... Suggestions 7
D Suggestion: VIEW option to open VIEW over tab window but not keep it there Suggestions 0
D Done Suggestion: Add VIEW option to open in same position as current window Suggestions 0
Fross Done Option to screen center msgbox Suggestions 2
P Done Have option not to pause TCMD console output when mouse is clicked elsewhere Suggestions 0
D Done BDEBUGGER: add cmdline option to set a breakpoint at a given line Suggestions 0
vefatica Done PAUSE: option to overwrite the prompt Suggestions 2
A Declined Enhance OPTION command functionality Suggestions 2
R Declined Install option: Add File Explorer Run As Adminstrator option Suggestions 14
Charles Dye Done TCEDIT: Command-line option to print files Suggestions 2
Charles Dye Done REGDIR: Hex display option Suggestions 1
Charles Dye TCEDIT: Path search option Suggestions 1
Charles Dye Done @SNAPSHOT: Add option to capture the entire virtual screen Suggestions 0
Charles Dye TASKLIST: Option to mark WOW64 processes Suggestions 0
Charles Dye Done PRINT: Option to set default printer Suggestions 0
A Declined An installer option to control .btm association Suggestions 0
Oz Solomon Done Recycle/Reuse window option for TCMD Suggestions 6
Charles Dye Done Option to prevent recursion into System subdirectories Suggestions 0
R Declined Padding option(s): @Day, @Month, @Doy Suggestions 5
L Completing the UnQLite command's option set Suggestions 0
jaejunks Done Option for case-sensitive string comparison in IF command (for CMD compatibility) Suggestions 1
rps Declined ECHO -- Add spacing option Suggestions 2
rps Declined TPIPE first match & count option Suggestions 2
rps Done Pause /wait option addition Suggestions 1
vefatica Done TIMER ... a partially quiet option Suggestions 1
D Done Add VIEW option to open in same position as current window Suggestions 0
R Done Find in screen buffer - case sensitive 'option' Suggestions 2
rconn Add option to run programs Elevated from toolbar buttons Suggestions 0
G Declined Add option to turn on file name case sensitivity Suggestions 6
Charles Dye Done New TYPE option Suggestions 0
S Declined Add /W(ipe) option to several commands Suggestions 17
S Declined New command or new ACTIVATE option request Suggestions 5
W Done Add an option to control command line parsing Suggestions 7
yjchung Declined Unblocking option for MSGBOX? Suggestions 8
E Declined Add option to use SFN for ComSpec variable Suggestions 8

Similar threads