Skip to main content
Inspiring
Nov 8, 2025 5:06 PM UTC
Question

Programmatically set linked path

Hi!
I want to set linked path, to active.doc path, provably set it using jsx script
It defaults to the last used path.
or set File.openDialog(), default to active doc path ?
Any ideas how to ?
Thanks!

 

1 reply

CarlosCanto
Community Expert
Community Expert
Nov 8, 2025 7:33 PM UTC

try this snippet to pre-select the current active document folder in an open dialog.

Make sure the active document is saved at least once. Unsaved documents don't have a file path

 

// preselect folder, set default open folder to active document folder (saved)

var f = app.activeDocument.fullName;

var ff = f.openDlg ("select file from f parent folder", "*.*", false);
//File.openDialog()
Translate