• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

require("path) inside script for knowing the dir ext etc functionality is there way

Explorer ,
Feb 13, 2022 Feb 13, 2022

Copy link to clipboard

Copied

Is there way to access the node.js require("path")  inside extended script please let me know. Where i can access the parent directory or ext etc. thanks in advance.{BE815B83-711D-49C4-A5DC-2A6646C87191}.png.jpg

TOPICS
SDK

Views

148

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Adobe Employee , Feb 14, 2022 Feb 14, 2022

Node.js requires JavaScript, and won't work within ExtendScript.

 

TVMStern's advice about using ExtendScript's File and Folder objects, is sound. 

 

Votes

Translate

Translate
Explorer ,
Feb 14, 2022 Feb 14, 2022

Copy link to clipboard

Copied

What do you try to do? Are you simply want to know where your JSX lies? There isn't any tools for this task AFAIK because all of scripts lie in operative memory after loading CEP. Look at File class and Folder class. They can help you.

 

// Get parent folder of file in extendscript
var pathToFile = "/path/to/file.zip"
var fileObj = new File(pathToFile);
var parent = fileObj.parent.fsName; // >> /path/to

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Employee ,
Feb 14, 2022 Feb 14, 2022

Copy link to clipboard

Copied

LATEST

Node.js requires JavaScript, and won't work within ExtendScript.

 

TVMStern's advice about using ExtendScript's File and Folder objects, is sound. 

 

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines