• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

PS CS4 save action that prevents file clobbering?

New Here ,
Apr 08, 2009 Apr 08, 2009

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.

TOPICS
Actions and scripting

Views

880

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe
Guru ,
Apr 08, 2009 Apr 08, 2009

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.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Employee ,
Apr 08, 2009 Apr 08, 2009

Copy link to clipboard

Copied

LATEST

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.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines