windows directory

A

Austin

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.
 
R

Rune Strand

On XP at least you have the environment variable "ProgramFiles".

You can fetch the path it holds through os.environ
 
D

Dennis Lee Bieber

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.

--
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,241
Messages
2,571,223
Members
47,859
Latest member
AidenNorth

Latest Threads

Top