Copy link to clipboard
Copied
Hello:
Does anyone know of an action step or event script that will alert you to the existence of a file when using non-dialog save commands in actions?
Scenario:
Suppose I have a "Save" action that points to a specific folder, I then save an image titled XXX into a folder called IMAGES. Then either intentionally or accidentally I get a new (i.e. completely different) image called XXX that I edit and resave to IMAGES via the action. Right now, CS3 and CS4 actions with suppressed save dialogs do not alert you to the existence of a file in the target location. It just saves over it.
I am using function keys to trigger script steps since I have different routines based on image content so batching a directory is not preferred.
The ideal solution would be an "if file exists in path" step.
Copy link to clipboard
Copied
Because you say you use function keys to trigger script steps, I not sure if you are using actions or scripts. I don't think that you can do want you want with just plain actions.
It would be easy to check for an existing file with a script.
Copy link to clipboard
Copied
You will need to write a script to check if the file already exists.
Install the script listener plug-in. Record you save step and check the listener log file on your desktop.
You can then do a if ( File("fullpathtofile").exists ) { alert ('dont do that'); } else { ... do regular save here ... }
Another option would be to use a unique file name generator so you don't ever clobber a file.