Copy link to clipboard
Copied
Hi,
I was wondering if it's possible to set an initial directory for the File.openDialog() function - like we can do for the Folder.selectDialog().
The File.openDialog() function keep the last folder in memory, but I would like to set an initial directory for the first time I click on my browse button.
Thanks
Copy link to clipboard
Copied
No problem: Create a File instance using the desired path and file name, then call the File object's openDlg() method.
var f = new File("/c/temp/myFile.txt");
f.openDlg();
The dialog will displaya the contents of "/c/temp", and the name field is preset to "myFile.txt".