Copy link to clipboard
Copied
Does anyone have a script they would share for batch exporting XML from IDCS3 files? I do not know anything about scripting so I do not know how to write one myself. I've also searched around and cannot find anything. I would appreciate any help with this anyone can offer.
Thanks,
Janine
Load a file that has some XML in it, set everything you want in the XML export dialog and export that file. These are now the default export settings. Then run Shonky's script or mine.
Peter
Copy link to clipboard
Copied
http://www.kahrel.plus.com/indesign/batch_convert_cs3.html
Copy link to clipboard
Copied
Thank-you Peter! This script is great. Sorry to ask this but is there anyway to set the export preferences within the script? See screenshots.
Thanks again!
Janine
Copy link to clipboard
Copied
Or use below Code:
try {
inFolderName= Folder.selectDialog ("Input Folder:");
outFolderName= Folder.selectDialog ("Output Folder:");
if ((inFolderName != null) && (outFolderName != null))
{
var idFileFolder = new Folder(inFolderName);
var files = idFileFolder.getFiles("*.indd");
for(myCounter = 0; myCounter < files.length; myCounter++)
{
var theDocument = app.open(File(files[myCounter]));
with ( theDocument ) {
myXMLFile = new File(outFolderName + "/" + name.replace(".indd","") + ".xml" );
exportFile( ExportFormat.xml, myXMLFile );
close(SaveOptions.no);
}
}
}
}
catch (err ) {
}
alert("All files export");
Shonky
Copy link to clipboard
Copied
Thanks Shonky! Your script works great also. I have the same question to you about setting the export preferences. Anyway to add those to the script?
Thanks again,
Janine
Copy link to clipboard
Copied
Load a file that has some XML in it, set everything you want in the XML export dialog and export that file. These are now the default export settings. Then run Shonky's script or mine.
Peter
Copy link to clipboard
Copied
Thanks Peter! You made this task much, much easier.
Janine
Copy link to clipboard
Copied
Hi Peter and Shonkyin,
I ran your scripts tonight, but both have the same trouble for me. You see I need to choose an xslt on export and even if I set that for the first xml export and then proceed with the rest, InDesign export doesn't remember that. Is there any way to add this to either of your scripts. I know this has been here a while, so maybe something like this has already been done.
All best,
Maureen
Find more inspiration, events, and resources on the new Adobe Community
Explore Now