How do I create a folder using ExtendScript?

前端 未结 3 1143
-上瘾入骨i
-上瘾入骨i 2021-02-09 17:36

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/extendscr

3条回答
  •  醉话见心
    2021-02-09 17:50

    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.)

提交回复
热议问题