SHGetSpecialFolderLocation Question?

kumar kumaran at yahoo.com
Mon Jan 20 15:35:17 EST 2003


Hi Dave,
  Thankyou very much. It worked

-Kumar

Dave Brueck <dave at pythonapocrypha.com> wrote in message news:<mailman.1043075626.23573.python-list at python.org>...
> On Mon, 20 Jan 2003, kumar wrote:
> 
> > The following python call always return "DESKTOP" as my personal
> > directory, where as it is a directory named "personal". Can some help
> > me with this?
> >
> > Python 2.0 (#8, Oct 16 2000, 17:27:58) [MSC 32 bit (Intel)] on win32
> > Type "copyright", "credits" or "license" for more information.
> > >>> from win32com.shell import shell, shellcon
> > >>> IDLList= shell.SHGetSpecialFolderLocation(shellcon.CSIDL_PERSONAL,
>  0)
> > >>> print "my_personal_dir =", shell.SHGetPathFromIDList(IDLList)
>  my_personal_dir = C:\WINNT\Profiles\kumar\DESKTOP
> > >>>
> 
> Hi Kumar,
> 
> I think the problem is that the first argument to
> SHGetSpecialFolderLocation is supposed to be hwndOwner:
> 
> SHGetSpecialFolderLocation(0, shellcon.CSIDL_PERSONAL)
> 
> HTH,
> -Dave




More information about the Python-list mailing list