I’m writing a custom script for Photoshop to handle batch processing of images. I have two input folders and an output folder that I need to specify. Right now I’m using something like this to select my folders:
var inputFolder = Folder.selectDialog("Select a folder of images to process");
Because I’m working on a server with a pretty deep folder hierarchy, it can be a real pain to select through the drop-down menu that Photoshop presents to me in this dialog.
It would be so much easier to have a folder selection dialog with an address bar and quick access panel like this:
All other PS scripts that I’ve been digging around in use the Folder.selectDialog
method to set file paths to a variable. Is there a reason for this? If not, then how can I instruct Photoshop the second style of folder navigation dialog?
2
Answers
It doesn't appear that Adobe supports this dialog as a folder selecting option.
There was a similar thread to this posted on the Adobe forums where a workaround was suggested:
https://forums.adobe.com/thread/1094128
The solution that was suggested is to use a
saveDialog
function instead ofselectFolder
. This gives you the folder dialog that we want, but comes with the downside of having to type a dummy name into the filename path. It also says "Save As" on the top of the dialog box, which is confusing.Here's what was offered:
I've also discovered that I can set the starting location of the
selectDialog
by usingselectDlg
instead:This gives some control over the starting location so that the user doesn't have to click through a million dropdowns.
At the bottom of your first screenshot you can see the unput text area
Folder: This PC
. It works just like an address bar. You can type (or paste) something like\serverworkfoldersubfolder
into this area and you get this folder (‘subfolder’ in this case) immediately.On MacOS this dialog doesn’t show the
Folder: ...
input area. But you can pressCmd-Shift-G
and get the native system ‘address bar’ anytime.