Should be elementary by now - but for some reason, I need another set of eyes on this.
tell application "Finder"
if itExists = true then
repeat with eachFile from x to numFiles
set fileNameX to (item x of filenames)
set name of (folderPath & thisFolder & ":" & fileNameX) to (folderName & "_" & fileNameX)
end repeat
else
doSomethingElse
end if
end tell
When itExists=true, I am generating the following error when I get to the “set name of” command -
However, the file is actually renamed, but the error kills the script… anyone know why the error would be generating in the first place?