Thread: Listing HD's
View Single Post
Old May 18th, 2008, 2:23 PM   #2
Freaky Chris
Hobbyist Programmer
 
Freaky Chris's Avatar
 
Join Date: Dec 2007
Location: England
Posts: 169
Rep Power: 1 Freaky Chris is on a distinguished road
Send a message via MSN to Freaky Chris
Re: Listing HD's

Is there a way of doing this properly or would i have to do something like this

Python Syntax (Toggle Plain Text)
  1. drives = ["A:\\", "B:\\", "C:\\", "D:\\", "E:\\", "F:\\", "G:\\", "H:\\", "I:\\", "J:\\", "K:\\", "L:\\", "M:\\", "N:\\", "O:\\", "P:\\", "Q:\\", "R:\\", "S:\\", "T:\\", "U:\\", "V:\\", "W:\\", "X:\\", "Y:\\", "Z:\\"]
  2. for drive in drives:
  3. if os.path.exists(drive):
  4. print drive, "Present"
  5. else:
  6. print drive, "Not Present"

So is that how i will have to do it, or is there an actual method to do that for you?

Chris
__________________
Who said i couldn't program
sarcasm = raw_input('Type in a sarcastic remark: ')
print sarcasm
Freaky Chris is offline   Reply With Quote