6 Replies Latest reply on Sep 11, 2010 1:01 PM by Muppet Mark-QAl63s

    user documents folder

    GbHerff

      Hi,

      I'm trying to make sure that the InDesign file is in a folder inside of the user's documents folder(cross-platform). When I test my variables with an alert, they look the same, but when I do an If else statement it tells me that they're not. I will be putting this into a much larger script as soon as I can get it working. Please help.

       

      var myDoc = app.activeDocument;
      var myFilePath = myDoc.filePath;
      var myParentFolder = myFilePath.parent;
      var myFolder = Folder.myDocuments;
      alert (myFolder)
      alert (myParentFolder)
      if (myParentFolder == myFolder){
      alert ("OK")
      }
      else {
      alert ("File is not in My Documents Folder")
      }