I’m not quite getting this — sorry for the confusion! I’m trying to get the parent folder of a project, then create an “output” folder inside it. However, I’m running into an issue I can’t explain. Here’s why:
export async function test() {
try {
const project = await ppro.Project.getActiveProject();
if (!project) {
return false;
}
const projectPath = project.path;
const projectFolder = path.dirname(projectPath);
const outputPath = path.join(projectFolder, "output");
log(outputPath); // output: "\\?\D:\Downloads\temp\output"
// However it doesn't work at this point. (see catched error)
const entry = await lfs.getEntryWithUrl(outputPath);
const nativePath = entry.nativePath;
log(nativePath);
} catch (err) {
log(err); // outputs: Error: Could not find an entry of 'file:///%5C%5C%3F%5CD:%5CDownloads%5Ctemp%5Coutput
}
}
Why does it output this?: file:///%5C%5C%3F%5CD:%5CDownloads%5Ctemp%5Coutput or \\?\D:\Downloads\temp\output
I’m not sure where file:///& \\?\ comes from — does it need to be there? If so, how should I handle it properly? Right now, I wrote a helper function that strips out file:/// & \\?\ and it works, but that doesn’t feel like the right approach. That’s actually what led me to try using nativePath instead.
I’m on Windows, using the latest versions of Premiere and UDT.
I also used UXP with Webview
Thank you!
