New internal commando cm_OpenMyDocuments
Posted: 2009-06-02, 07:19 UTC
The location of My Documents is not fixed so it would be nice to have this commando in "Navigation" section.
Forum - Public Discussion and Support
https://www.ghisler.ch/board/
Code: Select all
cd ::{450D8FBA-AD25-11D0-98A8-0800361B1103}
Exactly!m^2 wrote:cd %$PERSONAL%
New in Total Commander 6.50:
- New pseudo environment variables supported in path names, pointing to locations of virtual folders:
%$APPDATA%, %$DESKTOP%, %$PERSONAL% (My Documents), %$PROGRAMS%, %$STARTMENU%, %$FONTS%, %$STARTUP% (use lowercase to access env vars with these names)
Code: Select all
cd %$PERSONAL% --> c:\Documents and Settings\Wolfgang\My Documents\
cd ::{450D8FBA-AD25-11D0-98A8-0800361B1103} --> \\Eigene Dateien\
Code: Select all
cd %$DESKTOP% --> c:\Documents and Settings\Wolfgang\Desktop\
cm_OpenDesktop --> \\Desktop\
The pseudo environment variables seem to work only with the CD command of Total Commander.MVV wrote:New in Total Commander 6.50:
- New pseudo environment variables supported in path names, pointing to locations of virtual folders:
%$APPDATA%, %$DESKTOP%, %$PERSONAL% (My Documents), %$PROGRAMS%, %$STARTMENU%, %$FONTS%, %$STARTUP% (use lowercase to access env vars with these names)
Yes, it was said already that they are different.jb wrote:'cd %$PERSONAL%' and 'cd ::{450D8FBA-AD25-11D0-98A8-0800361B1103}' are not equivalent.
EXAMPLE on a multilingual Windows XP SP3 where the language of the current user is German:After all in this case the contents of both directories are identical.Code: Select all
cd %$PERSONAL% --> c:\Documents and Settings\Wolfgang\My Documents\ cd ::{450D8FBA-AD25-11D0-98A8-0800361B1103} --> \\Eigene Dateien\
I suggest to introduce cm_OpenMyDocuments with the behavior of cd ::{450D8FBA-AD25-11D0-98A8-0800361B1103}. Maybe this was already the intention of Bernt Ahlbäck.
Personally I prefer cd %$PERSONAL%, but for some users cd ::{450D8FBA-AD25-11D0-98A8-0800361B1103} is probably the better choice.
Also 'cd %$DESKTOP%' and 'cm_OpenDesktop' are not equivalent.
EXAMPLE on a multilingual Windows XP SP3 where the language of the current user is German:In this case even the contents of the displayed directories are different!Code: Select all
cd %$DESKTOP% --> c:\Documents and Settings\Wolfgang\Desktop\ cm_OpenDesktop --> \\Desktop\
\\Desktop\ shows the merged contents of "c:\Documents and Settings\Wolfgang\Desktop" and "c:\Dokumente und Einstellungen\All Users\Desktop".
The pseudo environment variables seem to work only with the CD command of Total Commander.MVV wrote:New in Total Commander 6.50:
- New pseudo environment variables supported in path names, pointing to locations of virtual folders:
%$APPDATA%, %$DESKTOP%, %$PERSONAL% (My Documents), %$PROGRAMS%, %$STARTMENU%, %$FONTS%, %$STARTUP% (use lowercase to access env vars with these names)
I expected that Total Commander would expand them for any user-defined button or menu entry.
What does "use lowercase to access env vars with these names" actually mean?
Generally the pseudo environment variables (and the differences to the corresponding commands) are hardly documented in the online help.
In this thread is was not already said explicitly.m^2 wrote:Yes, it was said already that they are different.
m^2 wrote:I see no reason to introduce a new command when cd ::{450D8FBA-AD25-11D0-98A8-0800361B1103} works. Sure it's not instant to find, but works well.
For me the following reasons are enough to introduce cm_OpenMyDocuments:MVV wrote:::{450D8FBA-AD25-11D0-98A8-0800361B1103} doesn't work at my machine (XP SP2, Vista, both RU).
OK. Thank you.m^2 wrote:"use lowercase to access env vars with these names": If you creates an environment variable %$PERSONAL% as C:\, cd %$PERSONAL% goes to c:\Documents and Settings\Wolfgang\My Documents\ and cd %$personal% to C:\
It's an approximation, not an equivalent as demonstrated in my previous post.MVV wrote:... So cd %$PERSONAL% is a good equivalent to cm_OpenMyDocuments.
Really? We can change dir to %$PERSONAL%, we can launch application through %$PERSONAL%. We can do with %$PERSONAL% more than with cm_OpenMyDocuments.jb wrote:But regarding pseudo environment variables my main point was that TC seems to expand the pseudo env vars only with the CD command. I find such a limited solution not appropriate for Total Commander.
Virtual folders made for cases when no usual folder available. In case of Documents folder we have an ordinary folder and a way to go to. Why we should add any commands if we can go to it already with cd %$PERSONAL%? What do you want to see in folder you got after cm_OpenMyDocuments besides contents of %$PERSONAL% folder?jb wrote:It's an approximation, not an equivalent as demonstrated in my previous post.MVV wrote:... So cd %$PERSONAL% is a good equivalent to cm_OpenMyDocuments.
This seems NOT work on my machine. Therefore I wrote already twice that TC seems to expand the pseudo environment variables only with the CD command.MVV wrote:... we can launch application through %$PERSONAL%.
I never suggested to remove the pseudo environment variables.MVV wrote:We can do with %$PERSONAL% more than with cm_OpenMyDocuments.
Plz look here: http://ghisler.ch/board/viewtopic.php?t=22676jb wrote:[*]TC should expand the pseudo environment variables in all situations (for launching an application, passing parameters, ...), not only with the CD command.[/list]
jb wrote:Can you really pass for example %$PERSONAL%\Test.txt to a compare tool on your machine?
You did not answer my question exactly.MVV wrote:I can launch:
%$PERSONAL%\MessageBox.exe (test app, message box shows)
%$PERSONAL%\Santa.swf (system asks an application 'cos .swf not registered)
"%$PERSONAL%\WinWars 2002.txt" (Notepad launches, long name, so works only with quotes)
Code: Select all
Command: %$PERSONAL%\NppPortable\notepad++.exe
Parameters: %$PERSONAL%\NppPortable\license.txt
Code: Select all
"C:\Dokumente und Einstellungen\jb\Eigene Dateien\NppPortable\notepad++.exe" PERSONALNppPortable\license.txt
Enviroment variables in parameter field always needs double percent sign to distinguish the TC variables %P,%N,.. from enviroment variables:jb wrote:notepad++.exe is launched indeed but the parameter is not passed correctly on my machine (as already mentioned)...Code: Select all
Command: %$PERSONAL%\NppPortable\notepad++.exe Parameters: %$PERSONAL%\NppPortable\license.txt
WithHolgerK wrote:Enviroment variables in parameter field always needs double percent sign to distinguish the TC variables %P,%N,.. from enviroment variables:
%%$PERSONAL%% should work as expected.
Code: Select all
Command: %$PERSONAL%\NppPortable\notepad++.exe
Parameters: %%$PERSONAL%%\NppPortable\license.txt
Code: Select all
"C:\Dokumente und Einstellungen\jb\Eigene Dateien\NppPortable\notepad++.exe" %$PERSONAL%\NppPortable\license.txt