I have a script that repeats thru a list of files from a mounted volume. Their paths are coming in as posix paths. Im trying to repeat thru the list, duplicate the file and then rename it (via a sub routine that is doing a lookup in excel. That script works.)
My problem is that I am getting an error when I go to duplicate the items in the inputs variable
Error I get is
"Can’t make “/Volumes/ACTIVE-A-M/TestJobs/BBW_GangingTest9/TempFiles/13GG21055SLPI-K.pdf” into type item
Any help would be appreciated.
on main(inputs, outputfolder, params)
tell application "Finder"
repeat with aitem in inputs --(inputs is a list of posix paths like "/Volumes/ACTIVE-A-M/TestJobs/BBW_GangingTest9/TempFiles/13GG21055SLPI-K.pdf"
set newFile to duplicate aitem
set name of newFile to newName -- newName is a variable that is generated from a excel lookup, script is not included he
end repeat
end tell
end main
on run
main(inputs, outputfolder, params)
return "OK"
end run