On Tue, 14 Jun 2005 15:32:02 +0800, "Austin" <[EMAIL PROTECTED]> said: > 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? >
You can find the current working directory with os.getcwd() If you want to know where a particular directory is (on a Windows 'drive') you could use: for drive_label in ["C", "D"]: if "Program Files" in os.listdir(drive_label + ":/"): return drive_label Or something similar. Cheers, Richard -- http://mail.python.org/mailman/listinfo/python-list