I have a photoshop document called "thisfilename.psd" and in that file there is a linked smart object which I want to relink to a file with the same name but a different extension (for example "thisfilename.jpg") in the same folder.

How can I achieve this? It can help me save a lot of work/time

Thanks in advance, feel free to ask any questions!

  • Hi Joris and welcome to GDSE. Could you please add some more details: is your layer — an active layer or it should be found first? Is your layer a linked smart object? Oct 31, 2019 at 9:02

1 Answer 1


If scripting doesn't give you a complete solution, you could probably do this with automation software like RoboTask (PC) or Automator (Mac). These programs can record and play back mouse movements, clicks, keystrokes, text variables, enter text into specified fields, change directories, rename/move/copy files, loop through lists, and a lot more. I've used them for complex multiple-step repetitive tasks for years and they are terrific time savers for this kind of thing once you get familiar with them. It's a lot easier to me than what this level of scripting would require.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.