4 Replies Latest reply on Oct 11, 2014 6:31 PM by Sergio Urra


    Sergio Urra

      Hello. I can't figure out how to get the number of files of an existing folder nested in the the activeDocument.path.


      This piece runs without any problem:


      var myPath = app.activeDocument.path;
      var files = myPath.getFiles();
      alert(files.length); // gives the number of files <----------


      This piece gets Error 24: myPath.getFiles is not a function


      var myPath = app.activeDocument.path+"/aNestedFolder/";
      alert (myPath);
      var files = myPath.getFiles(); // gets an error


      Any clue on how to make it works?


      Thanks in advance