How to? Follow a JUNCTION type directory link

Jun 24, 2008
223
0
Siegen, Germany
Is following a JUNCTION type directory link - like with CD "C:\Users\<user>\Start Menu" - possible?

My intention is to go to "C:\Users\<user>\AppData\Roaming\Microsoft\Windows\Start Menu" (i.e. the target) instead of the junction'ed directory.
 

Charles Dye

Super Moderator
Staff member
May 20, 2008
4,460
88
Albuquerque, NM
prospero.unm.edu
Or maybe an OPTION setting? Which would persist, and apply to other commands too: CHDIR, CDD, PUSHD, and implied CDD. You could catch most of those through a plugin, but I don't think there's any good way to trap the implied CDD.

If you post it in the feedback forum, I'll give it my one remaining vote.
 
May 20, 2008
11,400
99
Syracuse, NY, USA
It's odd that CD doesn't work. CDD and an automatic directory change both work.

Both of these fail.
Code:
v:\> cd /d "c:\Users\vefatica\AppData\Roaming\Microsoft\Windows\Start Menu"\

v:\> cd /d "c:\Users\vefatica\Start Menu"\

v:\>

All of these succeed.
Code:
v:\> cdd "c:\Users\vefatica\AppData\Roaming\Microsoft\Windows\Start Menu"\

c:\users\vefatica\appdata\roaming\microsoft\windows\start menu> d
2014-12-22  20:35  <DIR>  Programs
2012-03-09  11:12  174  desktop.ini

c:\users\vefatica\appdata\roaming\microsoft\windows\start menu> v:\

v:\> cdd "c:\Users\vefatica\Start Menu"\

c:\users\vefatica\start menu> d
2014-12-22  20:35  <DIR>  Programs
2012-03-09  11:12  174  desktop.ini

c:\users\vefatica\start menu> v:\

v:\> "c:\Users\vefatica\AppData\Roaming\Microsoft\Windows\Start Menu"\

c:\users\vefatica\appdata\roaming\microsoft\windows\start menu> v:\

v:\> "c:\Users\vefatica\Start Menu"\

c:\users\vefatica\start menu>
 
Jun 24, 2008
223
0
Siegen, Germany
Here (Windows 7, 64 bit, 17.00.75) CD, CDD, and PUSHD behave identically:
CD %userprofile%\start menu
will bring you to that exact directory, which has - due to it's JUNCTION nature - no contents.
 
May 20, 2008
11,400
99
Syracuse, NY, USA
What about an automatic directory change?
Code:
c:\users\vefatica> "Start Menu"\

c:\users\vefatica\start menu> d
2014-12-22  20:35  <DIR>  Programs
2012-03-09  11:12  174  desktop.ini
 
May 20, 2008
11,400
99
Syracuse, NY, USA
This is a matter of the security settings on the "Start Menu" junction. On another (more pristine) computer where I could not access/list "Start Menu", I had full access for SYSTEM, myself, and administrators and an entry for "Everyone" specifying "deny list/read". "Deny" entries take precedence. After removing the "Everyone" entry, I could access/list the stuff in there.
 
Similar threads
Thread starter Title Forum Replies Date
J junction copy/move handling Support 6
M How to? Get both path to and target of symbolic link/junction... Support 2
vefatica @TRUENAME not seeing through junction Support 11
S TCMD14 & free for JUNCTION's Support 14
Stefano Piccardi Fixed mklink /X junction\ Support 3
BobK The "JUNCTION" confusion with DIR at a command line Support 9
Joe Caverly Using TYPE with non-English text Support 22
vefatica TYPE behaving randomly Support 10
vefatica Garbage from TYPE Support 2
vefatica TYPE resets console tab settings Support 14
Joe Caverly Get a variable type Support 2
Joe Caverly v24 TYPE Re-direction Support 4
vefatica TYPE goes crazy with no-BOM Unicode file Support 7
J Piping ANSI control sequences through 'type' Support 4
S International characters - TYPE vs %@LINE function Support 5
thedave WAD Unable to type various characters using Windows 8's onscreen keyboard Support 7
vefatica Fixed TYPE http://... incomplete data Support 40
Phileosophos Documentation TPIPE /string type code confusion Support 4
S WAD %_do_errors does not report errors when loop control variable type is not directory entry Support 1
vefatica TYPE beeping? Support 12
Charles Dye TYPE /P behaves strangely with piped/redirected input Support 0
vefatica LIST and TYPE show UTF8 BOM Support 4
vefatica TYPE, Unicode, installer Support 10
Charles Dye Fixed TYPE /X reports FF for all values >= 80h Support 6
M More SafeChars type issues... Support 4
Charles Dye Strange output, here-doc redirection, TYPE, //UnicodeOutput=Yes Support 6
Roedy MIME type for *.btm ? Support 1
S TYPE command issue Support 12
vefatica TYPE /X and Unicode files? Support 0
dcantor LIST /X and TYPE /X give different results Support 20
Juanma Barranquero App Paths of type REG_EXPAND_SZ Support 2
E colorization outside of type Support 7
p.f.moore Documentation tweak for TYPE Support 5

Similar threads