Skip to main content
Inspiring
November 8, 2025
Question

Programmatically set linked path

  • November 8, 2025
  • 1 reply
  • 71 views

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
November 8, 2025

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()