Apologies, I am a complete beginner at scripting, I am currently working with images that need to be colour corrected against a corresponding thumbnail image.

My current file structure is two folders:

Mannequin

Image0001

Image0002

Image0003

etc.

Thumbnails

Image0001

Image0002

Image0003

etc.

I need to set up an action which runs on the files in the Mannequin folder, that opens up the corresponding file with the same filename in the Thumbnails folder, so that it can use that files colour information with the Colour Match tool.

I can record an action to open the Image0001 Thumbnail but then when I run the action for other files it will always open Image0001 thumbnail, which is not what I want.

Is it possible to use a variable filename? Or can I use the current filename to determine the file I open from it?

If you have image_001.jpg open from the mannequins directory, once run it will open image_001.jpg from the thumbnails directory. It's not very robust at the momen, but i'll work. If i have time I'll tidy it up.

This is a bit more robust (it won't fall over if you have no images open or can't find the corresponding image) I've made it so if you have the thumbnail image open it will find the mannequin image and visa versa. Save the script to your PS scripts directory. In photoshop record an action that uses the script. Stop recording! Then you can run the script as an action.