3 Replies Latest reply on Mar 3, 2015 2:22 AM by Peter Kahrel

    include on other harddrive

    doekewartena

      On my mac I used:

       

      #includepath "~/Documents/;%USERPROFILE%Documents";

       

      Now I switched to my pc and I need to point to somewhere else not on the C drive.

       

      I tried several things like:

       

      #include "D:\\catalogtree\\local_code"

       

      But I can't get it right. Is it even possible to point to another HD? And if so, how?

        • 1. Re: include on other harddrive
          Loic.Aigon Adobe Community Professional

          hi,

           

          I can't see why you couldn't. I guess this is because you tried different things but

           

          #include "D:\\catalogtree\\local_code"


          That just can't work. It's either

           

          #includepath "D:\\catalogtree\\local_code"

           

          Or

           

          #include "D:\\catalogtree\\local_code\\myScript.jsx"


          Generally when I want to double check file paths, I use File.openDialog().fsName; Eventually, uou can use $.evalFile but #include should work.

           

          FWIW,

           

          Loic

          http://www.ozalto.com

          • 2. Re: include on other harddrive
            BSKTCreation Level 2

            Hi,

             

            Here is how I do it.

             

            #include "/h/Function List.jsx";

             

            You have to have forward slashes not back slashes, so I copy and paste the path then replace the slashes and get rid of the colon and add one extra slash at the start. I hope this clears it up.

             

            Brett

            • 3. Re: include on other harddrive
              Peter Kahrel Adobe Community Professional & MVP

              The format that Brett gave is now the only format that works in InDesign JavaScripts. The format 'd:\\abc\klm.jsx' used to work, but no longer does (can't remember when it stopped working).

               

              An easy test to see if get the format right is this (and if you are certain that the file or folder exists):

               

              File ('/D/catalogtree/local_code/scr.jsx).exists

               

              or

               

              Folder ('/D/catalogtree/local_code/scr.jsx).exists

               

              Peter