Three problems

Deploying to Windows? Utilizing VB Script execution? This is the place to ask Windows-specific questions.

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Janschenkel
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 977
Joined: Sat Apr 08, 2006 7:47 am
Contact:

Post by Janschenkel » Tue Dec 02, 2008 5:54 am

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.
Quartam Reports & PDF Library for LiveCode
www.quartam.com

Post Reply