"David Candy" <.> wrote in message
The /n is ignored. /e is always a new window. /n in folder view forces a new
window even if a folder window to that folder already exists. Normally
windows create new windows for a folder unless there is a window open on
that folder in which case it switches to that window.
--
--------------------------------------------------------------------------------------------------
http://webdiary.smh.com.au/archives/_comment/001075.html
=================================================
billious said:
"David Candy" <.> wrote in message
For a start you can try using a correct command line, note no spaces or
/n.
explorer /e,c:\
--
--------------------------------------------------------------------------------------------------
http://webdiary.smh.com.au/archives/_comment/001075.html
=================================================
David, sweetness.
I've tried it your way - it made no difference.
The presence or absence of spaces is irrelevant - both from a theory and
practice viewpoint. Explorer's strange parsing of its command line is
caused
by the requirement to support folder names with spaces - hence the
introduction of the alternative command-parameter-separator character
(comma.)
/n and /e have a peculiar relationship to /root. According to kb article
307856, "if you want Windows Explorer to start at the root of drive C"
edit
the properties line to "%SystemRoot%\Explorer.exe /root, C:\"
This works, but produces ONE pane with C:\ expanded.
Changing this to /root,/e,/n,C:\ makes no difference BUT /root,/n,/e,C:\
(note: simply switching the order of the /e and /n switches) produces the
correct 2-pane layout (but doesn't cure the
"missing-marker"/C:-not-expanded-in-left-pane problem)
Changing this yet again to /root,/n,/e,C:\a folder happily opens 2 panes
with "a folder" expanded in the right panel only. The left pane shows C:
with expansion marker AND the selected "folder" and its expansion.
if /root is specified, /e, or /n, or /e,/n, (with or without spaces) shows
only one pane. only /n,/e, produces two panes. /root doesn't appear to
override C:\a folder as it would appear to be designed to do from the
documentation and its name. Removing the terminal "\" has no effect
either.
So, I've no idea what the point is of "/root" since it appears only to
affect the interpretation of /n and /e - and make the sequence
significant.
Without /root, it doesn't matter in which order /n and /e appear - /n,/e,
/e,/n, and /e, all do the same thing (2 panes, recognise C:\ and expand to
the right pane from C:\ - no marker or expansion in the left pane; if M:\
is
chosen, same story - except that M:\ IS expanded in the left pane and the
marker for C: magically appears.) With /n, alone only one pane is
generated.
...Bill
I ran the following batch to gather data:
[01]@echo off
[02]echo combo panes left>results.txt
[03]echo/>processed.txt
[04]for %%i in (- r) do for %%j in (- e) do for %%k in (- n) do call
roc1
%%i %%j %%k
[05]del processed.txt
[06]set yfc=
[07]goto :eof
[08]
[09]
roc1
[10]call
roc2 %1 %2 %3
[11]call
roc2 %1 %3 %2
[12]call
roc2 %2 %1 %3
[13]call
roc2 %2 %3 %1
[14]call
roc2 %3 %1 %2
[15]call
roc2 %3 %2 %1
[16]
[17]goto :eof
[18]
[19]
roc2
[20]:: combo already evaluated ?
[21]set yfc=%1%2%3
[22]set yfc=%yfc:-=%
[23]if not defined yfc set yfc=-
[24]findstr /b /c:"%yfc%" processed.txt>nul
[25]if not errorlevel 1 goto :eof
[26]echo %yfc%>>processed.txt
[27]echo %1%2%3 >>results.txt
[28]set yfc=
[29]
loop
[30]if [%1]==[r] set yfc=%yfc%/root,
[31]if [%1]==[e] set yfc=%yfc%/e,
[32]if [%1]==[n] set yfc=%yfc%/n,
[33]shift
[34]if not [%1]==[] goto ploop
[35]set yfc=%yfc%c:\program files
[36]start /w "" %systemroot%\explorer.exe %yfc%
[37]start /w /max "" notepad results.txt
[38]
[39]goto :eof
The results were:
combo panes left (where folder was C:\)
--- 1
--n 1
-e- 2 C: with NO marker, no expansion
-en 2 C: with NO marker, no expansion
-ne 2 C: with NO marker, no expansion
r-- 1
r-n 1
-nr 1
re- 1
er- 2 C: expanded correctly, other drives not visible
ren 1
rne 2 C: expanded in right pane only; no marker
ern 2 C: expanded in right pane only; no marker
enr 2 C: expanded correctly, other drives not visible
nre 1
ner 2 C: expanded correctly, other drives not visible
combo panes left (where folder was M:\)
--- 1
--n 1
-e- 2 M: expanded;C: has marker
-en 2 M: expanded;C: has marker
-ne 2 M: expanded;C: has marker
r-- 1
r-n 1
-nr 1
re- 2 M: expanded;C: has marker
er- 2 M: expanded;no other drives visible
ren 1
rne 2 M: expanded;C: has marker
ern 2 M: expanded;C: has marker
enr 2 M: expanded;no other drives visible
nre 1
ner 1
combo panes left (where folder was C:\Program Files)
--- 1
--n 1
-e- 2 C: with marker, "program files" ONLY expanded
-en 2 C: with marker, "program files" ONLY expanded
-ne 2 C: with marker, "program files" ONLY expanded
r-- 1
r-n 1
-nr 1
re- 1
er- 2 C:\program files ONLY expanded - no other drives or C:\ visible
ren 1
rne 2 C: with marker, "program files" ONLY expanded
ern 2 C: with marker, "program files" ONLY expanded
enr 2 C:\program files ONLY expanded - no other drives or C:\ visible
nre 1
ner 2 C:\program files ONLY expanded - no other drives or C:\ visible
Where 'n' 'e' and 'r' in the first column show the sequence of switches (/n,
/e, and /root,) specified.
It would seem that if there is no /root, switch then the /e, overrides /n,
which makes /n, redundant (another apparent Microsoft "switch to turn
something on which is on by default but there's no way of turning it off'")
Note the difference in the number of panes when the /root, switch is
included
r 1
rn 1
nr 1
re 2
er 2
rne 2
ren 1
ern 2
enr 2
nre 1
ner 1
Note the /root, alone or with /n, generates one pane but with /e, regardless
of order generates 2 panes
Where there are all 3 switches, there appears to be no rule.
....But regardless of the actions and redundancies of the switches, the fact
remains that NO combination will expand C:\ in the left pane, even 'though
where the drive/folder specified on the command line is M:\
e, en, ne, re, rne and ern yield completely correct results for the start
folder "M:\" (C: marker visible, M: expanded in the left pane from M:\) -
implying that "/e,M:\" is correct (/n, is redundant but harmless.)
The question is - why doesn't "/e,C:\" act in the same way - (M: marker
visible, C: expanded in the left pane from C:\) ?? What happens is the the
M: marker is visible, but C: has no marker or expansion in the left pane
(but C:\ IS expanded in the right pane.) When a batch job is run from a
folder in the right pane under these circumstances (by attaching a batch job
to provide a custom action as I've described) the expansion marker magically
appears for C: - which is some progress, even if the expansion doesn't occur
in the left pane.
....Bill