6 Replies Latest reply on Sep 4, 2009 8:12 PM by Yuliaart

    JS InDesign CS4: save document into specific location on a network

    Yuliaart Level 1

      Hi,

      I been able to save my document with new name, but I am not sure how to specify new network location for it. Here what I have:

       

       

      app.activeDocument.save (myFileName+".indd");

       

       

      Thank you very much for your help.

      Yulia

        • 1. Re: JS InDesign CS4: save document into specific location on a network
          [Jongware] Most Valuable Participant

          "save" accepts a fully qualified path name.

           

          app.activeDocument.save ("//168.176.5.22/volume%20(%20data%20)/A%20very%20Long%20Name/"+myFileName+".indd");

           

          I got this path from some document's fullName -- JS can also work with a somewhat friendlier syntax.

          • 2. Re: JS InDesign CS4: save document into specific location on a network
            Yuliaart Level 1

            Hi, John, thank you very much for your help, I am still running into same problems with it. It saves all that is in the brackets into the new file name and still sends it into some unspecified place on my desktop. Somehow it doesn't distinguish between where the server is and where the file name. Here is my line:

             

            app.activeDocument.save("/SPACE"+myFileName+".indd");

             

            where   "/SPACE"   is the server that I need to send it to

             

            and

             

            myFileName+".indd"     is file name that I need it to be.

             

             

            Thank you very much.

            Yulia

            • 3. Re: JS InDesign CS4: save document into specific location on a network
              [Jongware] Most Valuable Participant

              (Aside: me not a John, me a Theun. [JW] is just a convenient handle.)

               

              "/SPACE"+yourfilename is not a fully qualified path name. For one, with a 'yourfilename' of "foo", it will result into a full string

               

              /SPACEfoo

               

              and this can be taken apart in a path "/" (the root of your current drive) and a filename "SPACEfoo". You need another slash after "SPACE".

               

              Second, you should investigate what a full path looks like. I seriously doubt "/SPACE/" is a valid path on your machine. Use the one line script I showed to check what it looks like for a saved ID document.

               

              A small trick you might want to use is, pressing Ctrl+C (or Cmd+C, on Apples) with a dialog on screen copies the entire text of that dialog. That's how I copied the full path and file name into my previous mail -- I didn't type it in manually.

               

              [EDIT] Sorry, I did not include that one line script. It simply is

               

              alert (app.activeDocument.fullName);
              • 4. Re: JS InDesign CS4: save document into specific location on a network
                Yuliaart Level 1

                Sorry, Theyn, about your name, guessing not always works .

                 

                The reason I was using "SPACE" (it is its assigned name), because I did managed to link images from that server into InDesign using

                that name, but you are right, it has real pass name like 10.10.10.05, and it most likely will be more reliable way to do it. And I did tried

                to use that number and with / in front and after, and // in front and / after, and it still doing the same thing, just recordnig it into the file name

                and saving it to my desktop into an odd place. That's what I have tried:

                 

                app.activeDocument.save("//10.10.10.05/"+myFileName+".indd");

                 

                 

                where   "/10.10.10.05/"   is the server that I need to send it to

                 

                and

                 

                myFileName+".indd"     is file name that I need it to be.

                 

                 

                 

                Thank you for your patience. Sometimes it's hard to make sense of wierd names and have an idea what they represent.

                Your help is very highly apprecieted.

                Yulia.

                • 5. Re: JS InDesign CS4: save document into specific location on a network
                  [Jongware] Most Valuable Participant

                  Your example

                   

                  app.activeDocument.save("//10.10.10.05/"+myFileName+".indd");

                   

                  still does not contain a full path name. It will save the document in the root folder of the server. A full path to a folder "this" in a folder "that" in a folder "diddly" in the root of this server should look something like

                   

                  //10.10.10.05/diddly/that/this/

                   

                  -- note the final slash. Only at the very end of this, you would add your file name.

                   

                  Try this way: save a regular document in the folder where the script should save the files. Then run the one line script and press your local copy key. That will give you the full path, starting with this server ID, and with the rest of the path right behind it. Cut off the "filename.indd" at the end (do not remove the very last slash!), and presto! one valid path.

                  • 6. Re: JS InDesign CS4: save document into specific location on a network
                    Yuliaart Level 1

                    Thank you, Theun.

                    It works, I should've mentioned from the start that I am on Mac and needed to add Volumes before the server section. Now it's all working.

                    Thank you very much for your patience and help.

                    Yulia