| www.delorie.com/archives/browse.cgi | search |
| X-Spam-Check-By: | sourceware.org |
| Message-ID: | <459D822A.103@t-online.de> |
| Date: | Thu, 04 Jan 2007 23:39:38 +0100 |
| From: | Christian Franke <Christian DOT Franke AT t-online DOT de> |
| User-Agent: | Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.0.7) Gecko/20060910 SeaMonkey/1.0.5 |
| MIME-Version: | 1.0 |
| To: | cygwin AT cygwin DOT com |
| Subject: | Re: Two short scripts for Cygwin-Windows interoperation |
| References: | <loom DOT 20070104T172439-137 AT post DOT gmane DOT org> <Pine DOT GSO DOT 4 DOT 63 DOT 0701041220120 DOT 15041 AT access1 DOT cims DOT nyu DOT edu> <459D5852 DOT 8010407 AT t-online DOT de> <Pine DOT GSO DOT 4 DOT 63 DOT 0701041641350 DOT 15041 AT access1 DOT cims DOT nyu DOT edu> |
| In-Reply-To: | <Pine.GSO.4.63.0701041641350.15041@access1.cims.nyu.edu> |
| X-ID: | rSfl-yZGgeo6eKVn9zVvv-jfyjJLKqzfQxQ9kbxH5cTEEU6Ik7AAYo |
| X-TOI-MSGID: | 9b848182-e4d2-4d24-8111-fa1204186b01 |
| X-IsSubscribed: | yes |
| Mailing-List: | contact cygwin-help AT cygwin DOT com; run by ezmlm |
| List-Id: | <cygwin.cygwin.com> |
| List-Subscribe: | <mailto:cygwin-subscribe AT cygwin DOT com> |
| List-Archive: | <http://sourceware.org/ml/cygwin/> |
| List-Post: | <mailto:cygwin AT cygwin DOT com> |
| List-Help: | <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs> |
| Sender: | cygwin-owner AT cygwin DOT com |
| Mail-Followup-To: | cygwin AT cygwin DOT com |
| Delivered-To: | mailing list cygwin AT cygwin DOT com |
Igor Peshansky wrote:
> ...
> The point I was making was that maybe we could add another option to
> cygpath to retrieve the "My Documents" path... Opinions?
>
Yes, good point. I would suggest:
-M, --mydocs output 'My Documents' directory
and as an extension for still missing folders:
-F n, --folder=n output special folder with CSIDL value n (with 0xHEX
allowed)
Examples:
$ cygpath -M
/cygdrive/c/Documents and Settings/USER/My Documents
$ cygpath -F 5
/cygdrive/c/Documents and Settings/USER/My Documents
$ cygpath -F 0x19
/cygdrive/c/Documents and Settings/All Users/Desktop
$ cygpath -F 0x1a
/cygdrive/c/Documents and Settings/USER/Application Data
$ cygpath -F 0x35
/cygdrive/c/Documents and Settings/All Users/My Music
With a simple wrapper script, all symbolic may be used:
n="$(sed -n 's,#define CSIDL_'"$1"'\t\([0-9]*\),\1,p'
/usr/include/w32api/shlobj.h)"
cygpath -F ${n:?"$1 not found"}
Thanks for any comment
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/
| webmaster | delorie software privacy |
| Copyright © 2019 by DJ Delorie | Updated Jul 2019 |