2 Replies Latest reply on Mar 12, 2009 9:08 PM by ekipartner

    js Is it possible to change file names of the folder with ES  (like with AS)

    ekipartner Level 1
      Hi,

      Does anyone know how to change every file name of the selected folder using ExtendScript? ... or is it possible?

      eg like below:

      set fol to choose folder
      set astid to AppleScript's text item delimiters
      set AppleScript's text item delimiters to "_"
      tell application "Finder"
      repeat with apf in (get every file in entire contents of fol)
      set old_name to every word of (apf's name as text)
      set apf's name to ((old_name as text) & ".jpg")
      end repeat
      end tell
      set AppleScript's text item delimiters to astid

      regards
      Erkki