Igor Peshansky wrote:
...
The Desktop path can be obtained in a general way by "`cygpath -uD`".
Unfortunately, there is no such ready shortcut for "My Documents", though
"`cygpath -uH`/$USER/My Documents" should work for most installations of
the English versions of Windows.

The function SHGetSpecialFolderLocation() used by cygpath obtains (most of?) these pathnames from the registry.

To retrieve the cygwin path of "My Documents" folder, use:

$ cygpath -u "$(cat /proc/registry/HKEY_CURRENT_USER/Software/\
Microsoft/Windows/CurrentVersion/Explorer/Shell\ Folders/Personal)"

This works also on non-English XP.
It should also work on Vista (where ugly "\Documents and Settings\USER\My Documents" is finally replaced by "\Users\USER\Documents" ;-)

Christian


--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

Reply via email to