X-Spam-Check-By: sourceware.org Date: Fri, 5 Jan 2007 10:31:49 +0100 From: Corinna Vinschen To: cygwin AT cygwin DOT com Subject: Re: Two short scripts for Cygwin-Windows interoperation Message-ID: <20070105093149.GA28768@calimero.vinschen.de> Reply-To: cygwin AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com References: <459D5852 DOT 8010407 AT t-online DOT de> <459D822A DOT 103 AT t-online DOT de> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <459D822A.103@t-online.de> User-Agent: Mutt/1.4.2.2i Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com On Jan 4 23:39, Christian Franke wrote: > 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 http://cygwin.com/acronyms/#PTC http://cygwin.com/acronyms/#SHTDI Come on, what did you expect? ;) Corinna -- Corinna Vinschen Please, send mails regarding Cygwin to Cygwin Project Co-Leader cygwin AT cygwin DOT com Red Hat -- 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/