Open file explorer window

Hello!
In extendScript to open the file explorer in a specific directory is possible with:

Folder("~/Desktop/scanner").execute();

Is there any possibility to do this with UXP?
If anyone knows any commands, please share.
Thanks.

You can pass optional parameter to getFolder() API.
For more on the getFolder() API refer getfolder(options)

However, in your case you want to directly access ~/Desktop/scanner . Directly passing this string as param is not supported. However, UXP’s domains api supports several options like domains.userDesktop, domains.userDocuments which can be passed into the getfolder() as shown below.

const fs = require('uxp').storage.localFileSystem;
let domains = require("uxp").storage.domains;
let entry = await fs.getFolder({initialDomain:domains.userDocuments});
3 Likes

@kareemmyk Thanks for sharing! Seems like a good approach, I’ll have a look around here. @thanks for sharing! Seems like a good approach, I’ll take a look here.