Often you need to modify the images that are linked to your Indesign document. A good policy is to keep the old versions just in case you make a mistake and want to go back. So you will manually duplicate the linked image, give it a new name, like “version 2” or something, modify it and update it in Indesign.
This script saves all that messing around by duplicating the link, renaming it with a new version number, archiving the old link and updating the new link in Indesign.
Start by selecting the image and running the script. It will suggest a new name for the duplicated image file which you can change or confirm
Then the script asks you to confirm the name of the archive folder for the old version of the image.
The script will duplicate the linked document, rename it and archive the old one.
Now you just have to option + double click on the image to open it up in Photoshop or Illustrator and you will be editing your new version.