delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2002/10/23/17:59:25

Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sources.redhat.com/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
X-Authentication-Warning: slinky.cs.nyu.edu: pechtcha owned process doing -bs
Date: Wed, 23 Oct 2002 17:59:14 -0400 (EDT)
From: Igor Pechtchanski <pechtcha AT cs DOT nyu DOT edu>
Reply-To: cygwin AT cygwin DOT com
To: Stephan Mueller <smueller AT exchange DOT microsoft DOT com>
cc: cygwin AT cygwin DOT com
Subject: RE: Meaningful Windows locations and cygpath (Was Re: Is it possible
to copy a file from anywhere to My Documents with bash cp?)
In-Reply-To: <BF653A78FF4ED0468924C8721AC5EAE701457EE6@df-muttley.dogfood>
Message-ID: <Pine.GSO.4.44.0210231755410.19606-100000@slinky.cs.nyu.edu>
Importance: Normal
MIME-Version: 1.0

The cygpath code uses SHGetSpecialFolderLocation...  I guess I meant the
correct constants for the special folders, so thanks for the link.  I'll
look to see which of those directories would be worth adding.
	Igor

On Wed, 23 Oct 2002, Stephan Mueller wrote:

> The API you want to start with is probably SHGetFolderPath.  See
> http://msdn.microsoft.com/library/default.asp?url=/library/en-us/shellcc
> /platform/Shell/reference/functions/shgetfolderpath.asp
>
> It lists a number of CSIDL_* constants that you'd want to choose from,
> as well as linking to more complete lists.  It also mentions that for
> downlevel platforms, you may want SHGetSpecialFolderPath instead.
>
> This may turn out to be a fun one in terms of providing equivalent
> functionality in cygpath on all the Cygwin support platforms.
>
> stephan();
>
> -----Original Message-----
> From: Igor Pechtchanski [mailto:pechtcha AT cs DOT nyu DOT edu]
> Sent: Wednesday, October 23, 2002 1:07 PM
> To: cygwin AT cygwin DOT com
> Cc: Stephan Mueller
> Subject: Meaningful Windows locations and cygpath (Was Re: Is it
> possible to copy a file from anywhere to My Documents with bash cp?)
>
> Hmm...  cygpath currently has options to print the windows Documents and
> Settings directory (-H), as well as the Start Menu/Programs directory
> (-P).  Should we add more options for the other meaningful Windows
> directories (such as My Documents, for example)?  What other special
> names should we be aware of?  Would anyone know which API calls return
> these?
>         Igor
> P.S. As an aside, I've just discovered that the -A flag is ignored or
> non-functional on Win98...  I'll look into that.
>
> On Wed, 23 Oct 2002, Stephan Mueller wrote:
>
> > To add new wrinkles after the final one, "$USERPROFILE/My Documents"
> > is still somewhat presumptuous.  That certainly looks like the default
>
> > location, but in Windows XP (what I just checked on) the user is
> > allowed to change the location of My Documents through the UI.  On my
> > machine, it's (Windows syntax) D:\Doc, even though %USERPROFILE% still
>
> > references C:\Documents and Settings\smueller.
> >
> > stephan();
> >
> > -----Original Message-----
> > From: Don Dwiggins [mailto:dond AT advancedmp DOT com]
> > Sent: Wednesday, October 23, 2002 12:14 PM
> > To: cygwin AT cygwin DOT com
> > Subject: Re: Is it possible to copy a file from anywhere to My
> > Documents with bash cp?
> >
> > Randall R Schulz writes:
> > > You should be able to see the contents of your "My Documents"
> > > directory with this command:
> >
> > > % ls -l "$USERPROFILE/My Documents"
> >
> > > Likewise, you can move or copy files to that directory like this:
> >
> > > % cp SomeFile "$USERPROFILE/My Documents"
> > > % mv OtherFile "$USERPROFILE/My Documents"
> >
> > As a final wrinkle, if you're going to do this a lot, you might want
> > to do something like "mount -u "$USERPROFILE/My Documents" /mydocs";
> > then you can say things like "mv furniture /mydocs".

-- 
				http://cs.nyu.edu/~pechtcha/
      |\      _,,,---,,_		pechtcha AT cs DOT nyu DOT edu
ZZZzz /,`.-'`'    -.  ;-;;,_		igor AT watson DOT ibm DOT com
     |,4-  ) )-,_. ,\ (  `'-'		Igor Pechtchanski
    '---''(_/--'  `-'\_) fL	a.k.a JaguaR-R-R-r-r-r-.-.-.  Meow!

"Water molecules expand as they grow warmer" (C) Popular Science, Oct'02, p.51


--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019