Hi all:
I am trying to open a file in PS 7, resizing it and then doing a save as to a different location (on the same server) and then renaming the file. Everything works fine except for when I go to rename it, I get an AppleScript error, “Finder got an error. The operation could not be completed.” When I go to the newly created file I can manually rename it, I can move it into other folders, I can replace an older version of the new file but I cannot delete it, I get the file is in use error message. I am using OS X 10.2.8. My code is below. Any help would be appreciated.
Thanks
Steve
==========
Code follows
on moveAsset(thisFilePath, thisMagPath, theHoldingPath, theArchivePath, theThumbnailPath, theWidth, theHeight)…
…tell applcation “Adobe Photoshop 7.0”…
…resize image current document width theWidthPixels height theHeightPixels
set myOptions to {class:JPEG save options, embed color profile:false, format options:standard, matte:background color matte}
save current document in (theThumbnailPath) as JPEG with options myOptions
close current document saving no
end tell
set theOldFilePath to (theThumbnailPath as string) & newFileName as alias
tell application “Finder”
set name of file theOldFilePath to thumbName
end tell
return thisFile
end moveAsset