Copy link to clipboard
Copied
Is there a way (through a script or any other means) to export the final packaged files to two separate Google Drive folders? We have both a regional Marketing Drive where final files need to be saved as well as a central Design Drive where final files need to be saved. I am looking for a solution that helps avoid Design having to save out the final files twice to place them in two separate folders.
Copy link to clipboard
Copied
It's most likely scriptable but there's no native way to do it.
Copy link to clipboard
Copied
You can mount up to three Google Drive folders at once. Why not package to one and simply drag-copy the folder to the other at the desktop?
Copy link to clipboard
Copied
Hi! How do you drag-copy a file over from one Google Drive for Desktop location to another? If I drag it, it moves it completely.
Copy link to clipboard
Copied
You can locate the google drives on separate drives
or
control-drag/option-drag from one google drive folder to another if on same drive.
You could also use an OS automation program like Mac Automator to set up a watched folder.
Copy link to clipboard
Copied
Hello @defaultii6zlymuiejz
The below script will package the the active document twice, I created two folders on my desktop for testing (Package-1 and Package-2). You'll need to define the correct file paths for myPackage1 and myPackage2 replacing (~/Desktop/Package-1/ and ~/Desktop/Package-2/) leaving the "+ myDocPackage" in place as that creates the packaged folder named by the document name plus the word Folder. You'll also have to set the package options to your requirements.
doc = app.documents[0];
var myDocPackage = doc.name.replace(/.indd$/i, " Folder");
myPackage1 = Folder('~/Desktop/Package-1/' + myDocPackage);
myPackage2 = Folder('~/Desktop/Package-2/' + myDocPackage);
var myPreset = "undefined";
doc.packageForPrint (
to = myPackage1,
copyingFonts = true,
copyingLinkedGraphics =true,
copyingProfiles = false,
updatingGraphics = true,
includingHiddenLayers = true,
ignorePreflightErrors = true,
creatingReport = false,
includeIdml = true,
includePdf = false,
pdfStyle = myPreset,
useDocumentHyphenationExceptionsOnly = false,
versionComments = "",
forceSave = true,
)
doc.packageForPrint (
to = myPackage2,
copyingFonts = true,
copyingLinkedGraphics =true,
copyingProfiles = false,
updatingGraphics = true,
includingHiddenLayers = true,
ignorePreflightErrors = true,
creatingReport = false,
includeIdml = true,
includePdf = false,
pdfStyle = myPreset,
useDocumentHyphenationExceptionsOnly = false,
versionComments = "",
forceSave = true,
)
Regards,
Mike
Copy link to clipboard
Copied
Amazing! Quick question - what if I want to package one version to a consistent location which could be part of the script but for the other version, its final folder location will always change (since it has to be under the region and client name folder). So I still want to be able to pick that location through InDesign while having the second package go to a consistent folder elsewhere.
Copy link to clipboard
Copied
Hello @defaultii6zlymuiejz
Re: Quick question - what if I want to package one version to a consistent location which could be part of the script but for the other version, its final folder location will always change (since it has to be under the region and client name folder). So I still want to be able to pick that location through InDesign while having the second package go to a consistent folder elsewhere.
The consistent folder location for the first packaging needs to be defined by you as stated in my previous post.
The below script allows you to select the location where the second packaging should go.
doc = app.documents[0];
var myDocPackage = doc.name.replace(/.indd$/i, " Folder");
myPackage1 = Folder('~/Desktop/Package-1/' + myDocPackage);
var myPackage2 = Folder.selectDialog ("Select the region and client folder for Packaging");
if (myPackage2 != null){
}else{
exit();
}
var mySelectedFolder = new Folder(myPackage2.fsName + "/" + myDocPackage);
var myPreset = "undefined";
doc.packageForPrint (
to = myPackage1,
copyingFonts = true,
copyingLinkedGraphics =true,
copyingProfiles = false,
updatingGraphics = true,
includingHiddenLayers = true,
ignorePreflightErrors = true,
creatingReport = false,
includeIdml = true,
includePdf = false,
pdfStyle = myPreset,
useDocumentHyphenationExceptionsOnly = false,
versionComments = "",
forceSave = true,
)
doc.packageForPrint (
to = mySelectedFolder,
copyingFonts = true,
copyingLinkedGraphics =true,
copyingProfiles = false,
updatingGraphics = true,
includingHiddenLayers = true,
ignorePreflightErrors = true,
creatingReport = false,
includeIdml = true,
includePdf = false,
pdfStyle = myPreset,
useDocumentHyphenationExceptionsOnly = false,
versionComments = "",
forceSave = true,
)
Regards,
Mike
Copy link to clipboard
Copied
Thank you! I have been testing it out by creating a 'Package-1' folder on my desktop and copying the file path to that folder into the code but it does not work for me. I updated the below code to:
('/Users/firstname.lastname/Desktop/Package-1/' + myDocPackage);
and
('~/Users/firstname.lastname/Desktop/Package-1/' + myDocPackage);
I wasn't sure if I was supposed to remove the "~" so I tested it both ways. The firstname.lastname is just a placeholder I am using for this post but it has my actual name in the code. Please let me know if I am missing something!
Copy link to clipboard
Copied
Hello @defaultii6zlymuiejz,
Re: I wasn't sure if I was supposed to remove the "~" so I tested it both ways. The firstname.lastname is just a placeholder I am using for this post but it has my actual name in the code. Please let me know if I am missing something!
There's no need to put in the users name, this is always the current user's desktop.
'~/Desktop/'
Try running the script just as it was written with...
myPackage1 = Folder('~/Desktop/Package-1/' + myDocPackage);
Regards,
Mike