BigDaddyO 61 Posted May 7, 2004 I am trying to search a listing in an INI file to see if it matches what is being pulled from a comptuer. I have a pretty long list of hard drive volume labels and what I want to do is the DriveGetLabel and then check the return to see if it matches what is in the list in the INI. I currently have $Volume = DriveGetLabel("C:\") I figure I have do do a While statement or something like that if $Volume = INIREAD info. but I just can't seem to figure it out. hmm... I guess I have to have a signature... Share this post Link to post Share on other sites
Jos 2,167 Posted May 7, 2004 In this example if the volume name is Data or program it will return FOUND: $Volume = DriveGetLabel("C:\") If IniRead('label.ini','drivelabels',$Volume,'???') = '???' Then msgbox(0,'drivelabel', 'label:'& $Volume & ' not found') Else msgbox(0,'drivelabel', 'label:'& $Volume & ' found') EndIf File label.ini [drivelabels]data=y program=y SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past. Share this post Link to post Share on other sites
BigDaddyO 61 Posted May 7, 2004 That worked great. I never really looked that closely at the default section of the iniRead. Thanks hmm... I guess I have to have a signature... Share this post Link to post Share on other sites