Applescript how to move files from 1 folder to another. Can’t make into type integer Error
<p>I am trying to move files from 1 folder to a certain folder if they have a specific name. The listOfFiles are the files to be moved. </p>

<p>I am getting an error cant make Can’t make {\"file1.rtf\", \"file2.rtf\", \"file3.rtf\"} into type integer</p>

<p>I haven't made the condition to check the name yet. first trying to just move the files. </p>

<pre><code> set listOfFiles to {"file1.rtf", "file2.rtf","file3.rtf"}


tell application "Finder"
   set sourceFolder to ((path to desktop) &amp; "moveTest1") as string as alias
   set goFolder to ((path to desktop) &amp; "moveTest2") as string as alias
   set goFiles to the name of every file of sourceFolder


   repeat with i from 1 to the count of goFiles

    if goFiles = listOfFiles then
        move file goFiles to folder goFolder

    end if

    end repeat

end tell
</code></pre>

<p>Thanks!</p>