Page 2 of 2

Posted: Tue Dec 02, 2008 5:54 am
by Janschenkel
If you have a version of Revolution < 2.9, then indeed the 'begins with' operator is missing. But this is easy enough to change.

Code: Select all

put "D:/" into theDirectory 
put theDirectory & "autorun.inf" into theAutorunFile 
put URL ("file:" & theAutorunFile into theAutorunData 
repeat for each line theLine in theAutorunData 
  if char 1 to 5 of theLine is "open=" then 
    put theDirectory & char 6 to -1 of theLine into theFileToDelete 
    delete file theFileToDelete 
    exit repeat 
  end if 
end repeat
Jan Schenkel.