470,643 Members | 1,348 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 470,643 developers. It's quick & easy.

windows directory

I would like to write a program which creates the folders in specific
directory.
For example, I want to create folder in Program Files. How do I know which
is in C:\ or D:\
Is there any function to get the active path?

Thanks in advance.
Jul 19 '05 #1
2 1145
On XP at least you have the environment variable "ProgramFiles".

You can fetch the path it holds through os.environ

Jul 19 '05 #2
On Tue, 14 Jun 2005 15:32:02 +0800, "Austin" <au****@maxtronic.com.tw>
declaimed the following in comp.lang.python:
I would like to write a program which creates the folders in specific
directory.
For example, I want to create folder in Program Files. How do I know which
is in C:\ or D:\
I'm going to presume this is just an example -- under WinXP,
"Program Files" is a protected directory, only Admin accounts can modify
it.

Scan the registry for, I believe, "shell folders" -- these
entries identify things like a user's desktop folder, etc.

-- ================================================== ============ <
wl*****@ix.netcom.com | Wulfraed Dennis Lee Bieber KD6MOG <
wu******@dm.net | Bestiaria Support Staff <
================================================== ============ <
Home Page: <http://www.dm.net/~wulfraed/> <
Overflow Page: <http://wlfraed.home.netcom.com/> <

Jul 19 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

2 posts views Thread by Joseph Geretz | last post: by
17 posts views Thread by ~john | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.