I have an inDesign server .jsx that works well for altering an inDesign file and exporting as a PDF, however I need to change my export location off of the C drive so that I can mount it to an external Linux server. I have tried using the full UNC path of a network share as well as a mapped drive, but I am unable to reference a file location outside of the C drive and cannot find documentation on referencing an external drive.
Does anyone know the syntax for a file located outside of the C drive? The following line of code works for setting the export location on the C drive, but altering the path to another drive or IP address does not seem to work.
I've always used this form for UNC:
Thank you for the response, unfortunately that syntax isn't working in this instance. Using forward slashes adds the C drive automatically and completely messes up the path. When using backlashes the folder is not recognized, even though the path is copied directly.
var myOutFile = new File("\\**.*.*.**\***\process\que\finished\businessCard2.jpg");
Error: "Cannot find the folder "\\**.*.*.**\***\process\que\finished\businessCard2.jpg"
Is there any reason the shared network would not be accessible from the JSX script? I have tried altering permissions and had no luck.
For what it's worth, this works for me running a .jsx script from InDesign on a Mac setting a variable to open a template on a shared network.
var myTemplate = File('/Volumes/ServerShareName/FolderName/MyTemplate.indt');
One thing that it's easy to overlook is that a server process is often run in a different environment or different user. This means it won't have any of the networked drive letter you see when you look in an interactive seesion. The user used may have no rights to mount the remote drives you want to use. This may need careful liason with the server and network administrators.
Another point to consider is that some consider it unwise to make a server process write a network drive, because you introduce multiple points of failure. Fine if ALL work depends on this network drive, but if you have multiple outputs, you may be setting up something to fail if any part of the system fails. Generally it's better to write local, then use an asychronous system to copy to the network.