[Tutor] Quickest way to find a folder on windows

John Purser johnp at milwaukielumber.com
Tue Jul 26 17:18:35 CEST 2005

Since the "My Documents" folder can be re-named you need to search the
registry to see what the user's "my documents" folder is.  I'm not sure what
domain constraints might do to this setting.  Perhaps the most efficient
method if you were just interested in the current user's "My Documents"
directory would be to determine the current value of the %HOME% variable.

John Purser


From: tutor-bounces at python.org [mailto:tutor-bounces at python.org] On Behalf
Of Jorge Louis De Castro
Sent: Tuesday, July 26, 2005 04:32
To: tutor at python.org
Subject: [Tutor] Quickest way to find a folder on windows

Hi all,   What is the quickest way to find/search a folder on windows?
Specifically, I want to find the 'My Documents' folder on different machines
but since this one lies in different user-specific folders (the user account
on XP) I'm being forced to traverse the whole drive looking for it (though I
can start from 'Documents and Settings' to prune the search space)   Is
there a faster way? I know this is very reliant on the windows search API so
maybe I'm stuck with my solution Any help is appreciated   cheers j 

More information about the Tutor mailing list