Jane Chen wrote: > I want my script to tell if the removable disk is an SD card or not, > so I wrote the following script. > > buf_fmt='HHLLLL' > buf_size=struct.calcsize(buf_fmt) > > drives = (drive for drive in win32api.GetLogicalDriveStrings ().split > ("\\\000") if drive) > for drive in drives: > if win32file.GetDriveType (drive)==2: > print "Removable Disk" , drive > if 'A' in drive: > print "floppy" > else: > drive="\\\\.\\"+drive+'.'
Why are you adding a dot? That's a mistake. You want just "\\\\.\\E:" . Remove the +'.' -- Tim Roberts, t...@probo.com Providenza & Boekelheide, Inc. _______________________________________________ python-win32 mailing list python-win32@python.org http://mail.python.org/mailman/listinfo/python-win32