script to change name and overwrite

Hey I’m kinda new to applescript and am having a little trouble.

When I save a raw camera file with photoshop camera raw it doesn’t overwrite the file, but it makes a duplicate and appends a “-1” on the end. I need the new files to be named the same and replace the original ones, i.e. without the -1.

I thought the easiest way would be to just update the rename files script that is provided by apple in OSX since the script will not allow you to make a name for a file that already exists. I couldn’t get it to work however.

Can anyone think of an easier way?

thanks

You mean you can’t set the name in the save dialog, or you’re just selecting File>Save and it’s doing the -1 thing on it’s own? What version of Photoshop? There must be a pref in there somewhere to set this behavior, no?

well the cmaera raw plugin is sort of it’s own program under CS2 the save button acts as a save as becasue it is like re-converting the file out of RAW…it’s like safari when it downloads the same file it will put a -1 after it instead of overwriting. I looked for the pref to change but couldn’t find one in either case.

nevermind…found the preference in camera raw “update embedded jpeg previews”