1 Reply Latest reply on May 5, 2015 8:39 AM by Vamitul

    Extension Change

    Level 1

      I need to change the file extension in the particular path


      example:      .html           to     .xml


      Is this possible to change the same via indesign scripting


      var myf=Folder.selectDialog("Choose folder for Application File");

      if (myf != null)


      var myfile=myf.getFiles("*.html");

      var a = myfile.length;


      for (var i=0; i<a;i++)


          var myPath = myfile[i].filePath; 

          var myNEWName = (myfile[i].name.replace(".html",".xml")); 

          var myDc = new File(myPath+"/"+myNEWName);