Skip to content Skip to sidebar Skip to footer

How Do I Create A Folder Using Extendscript?

This seems like it would be a very easy problem to solve, but I've been banging my head against it for almost an hour. All I need is a snippet of javascript/extendscript code so t

Solution 1:

var f = new Folder('/c/myfolder/');
    if (!f.exists)
        f.create();

Solution 2:

Okay, found a work-around: I have to specify the folder absolutely, rather than use the ~ home shortcut. In addition, I have use /Volumes at the very beginning. Thus, the code becomes:

var f = new Folder("/Volumes/apache HD/Users/apache/Desktop/my_new_fodler");  
f.create();

And that seems to work, finally. Thanks for your help, @Anna Forrest and @fabiantheblind! (You seem to be the resident ExtendScript expert around here.)

Solution 3:

Post a Comment for "How Do I Create A Folder Using Extendscript?"