suggestion : opening a file from a script, after file has been moved

Moderator: jsachs

Post Reply
pierrelabreche
Posts: 713
Joined: January 29th, 2019, 11:47 pm
What is the make/model of your primary camera?: Nikon Z8

suggestion : opening a file from a script, after file has been moved

Post by pierrelabreche »

When running a script where the input file has been moved, PWP already suggests in a dialog box several useful options:
  • Select a replacement file
  • Edit Pathname
  • Change folder to
  • Change drive letter to
Issue:
The “Change folder to” field currently defaults to the last folder used. However, this may not be the correct folder—especially when both the script and its associated image have been moved together to a new location.

Suggested Improvement:
Instead of remembering the last-used folder, initialize the “Change folder to” field using a relative path based on the original location of the source image, adjusted to reflect the new location of the script.

Example:
Suppose the original image was located in X/Sources and the script was in X/Scripts. If both are moved from folder X to folder Y, then opening the script from Y/Scripts should automatically locate the image in Y/Sources by preserving the relative path between them.
jsachs
Posts: 4759
Joined: January 22nd, 2009, 11:03 pm

Re: suggestion : opening a file from a script, after file has been moved

Post by jsachs »

You should be able set up a search list (Script/Search List... in the main menu) to locate the image file automatically -- just make Relative one of the search rules.
Jonathan Sachs
Digital Light & Color
pierrelabreche
Posts: 713
Joined: January 29th, 2019, 11:47 pm
What is the make/model of your primary camera?: Nikon Z8

Re: suggestion : opening a file from a script, after file has been moved

Post by pierrelabreche »

Thank you, I will try it
pierrelabreche
Posts: 713
Joined: January 29th, 2019, 11:47 pm
What is the make/model of your primary camera?: Nikon Z8

Re: suggestion : opening a file from a script, after file has been moved

Post by pierrelabreche »

I was unaware of this script setting - it works very well, thanks !
Post Reply