2 Replies Latest reply on Apr 13, 2017 4:23 AM by FabianK007

    How to find if a file exists using FrameMaker with ExtendScript?

    FabianK007

      Dear Community,

       

      How do I find out if a give file exist? I found an answer here: How to find if a file exists using FrameMaker API ?

      Is there a similar function in ExtendScript?

       

      I want to look up several files, but the code I use is rather slow.

       

      var path = "D:\\Folder\\File.ext"
      var doc = SimpleOpen(path, "");
      
      
      if(doc.ObjectValid() == true){
          alert("The file exists");
          }
      else {
          alert("The file does not exist");
          }
      doc.Close(Constants.FF_CLOSE_MODIFIED);
      

       

       

      Regards

      Fabian