title: Applescript open all file in folder one by one
body: <p>I'm only a beginner sorry if my question look stupid.</p>
  
  <p>Right now I'm trying to write a script that convert all my .webarchive to .html, so I end up using application called "iCab" to open .webarchive and save it to .html</p>
  
  <p>Here is the question I've all my .webarchive in save folder and I need a loop to open it all one by one, so I can put this fragment of code inside the loop</p>
  
  <pre><code>tell application "iCab" to open file file_name
  tell application "iCab" to activate
  delay 1
  tell application "System Events"
      tell process "iCab"
          click menu item "Save As…" of menu "File" of menu bar 1
          key code 76
          click menu item "Close Window" of menu "File" of menu bar 1
      end tell
  end tell
  </code></pre>
  
  <p>Thank you in advance</p>