Skip to main content
New Participant
April 26, 2024
Answered

Idml file type doesn't unzip using Mac Archive Utility

  • April 26, 2024
  • 4 replies
  • 892 views

Hi,

 

We have a use case where we download assets in AEM which would contain some renditions. These are downloaded as zip files but when we try to unzip using Mac Archive Utility they wouldn't open rather we have to use some third party applications to unzip. What complicates it is that not all zip files open using the same third party unzip application. We observed that we are seeing this issue only when the file type is .idml and wondersing if there is a work around to unzip .idml files using Mac archive utility.

 

Thanks! 

Correct answer leo.r

Mac's archive utility can't unzip IDML archives (even if you change the extension to .zip).

 

The method I know is that you need to use the unzip shell command:

 

 

unzip <source zip or idml> -d <output dir>

 

 

In some cases this may not work either in which case you'll need to 'fix' the original zip first using the zip command:

 

 

zip -FF <source zip or idml> --out <output zip>

 

 

then unzip the resulting zip as above.

 

Actually, you may want to just always run the 'fix' script first anyway.

 

I found these instructions somewhere on the net years ago. It always worked so far.

 

You of course can automate this process one way or another instead of running it manually from Terminal (for example, with an AppleScript droplet).

4 replies

Community Expert
July 22, 2024

Another update:

When in InDesign run the ExtendScript code below from InDesign's Scripts panel.

Should work in Windows and on macOS:

 

/*
	ExtendScript code. Run the script file with suffix *.jsx from InDesign's Scripts folder.

	Select an IDMS file through an open dialog.
	The file will be unzipped to a folder with the name of the IDML file without the suffix.
*/

var getIDMLFile = File.openDialog
(
	"Open InDesign IDML File" ,
	"*.idml",
	false
);

if( getIDMLFile == null )
{
	alert( "NO FILE SELECTED." );
	exit();
};

if( !getIDMLFile.name.match(/\.idml$/) )
{
	alert( "Selected file is not an IDML file." );
	exit();
};

try{
	var targetFolder = Folder( getIDMLFile.parent +"/"+ getIDMLFile.name.replace(/\.idml$/,"") );

	// Unpack IDML file:
	app.unpackageUCF( getIDMLFile , targetFolder );
}catch(e)
{
	alert( "Could not unzip file." );
	exit();
};

alert( "Done" );

 

 

Note: tested with InDesign 2024 version 19.5.0.84 on macOS.

Additional note: The script is also working with InDesign 2025 version 20.1.0.71 on macOS.

 

Regards,
Uwe Laubender
( Adobe Community Expert )

leo.r
leo.rCorrect answer
Community Expert
April 27, 2024

Mac's archive utility can't unzip IDML archives (even if you change the extension to .zip).

 

The method I know is that you need to use the unzip shell command:

 

 

unzip <source zip or idml> -d <output dir>

 

 

In some cases this may not work either in which case you'll need to 'fix' the original zip first using the zip command:

 

 

zip -FF <source zip or idml> --out <output zip>

 

 

then unzip the resulting zip as above.

 

Actually, you may want to just always run the 'fix' script first anyway.

 

I found these instructions somewhere on the net years ago. It always worked so far.

 

You of course can automate this process one way or another instead of running it manually from Terminal (for example, with an AppleScript droplet).

leo.r
Community Expert
July 19, 2024

Update:

 

The unpackage UCF AppleScript command in InDesign can also unpackage (unzip) IDML files, so it can be done in one step:

 

tell application "Adobe InDesign 2024" to unpackage UCF UCF file "posix-path-to-idml-file" destination folder "posix-path-of-destination-folder"
James Gifford—NitroPress
Brainiac
April 26, 2024

Somewhat aside, but ZIP is an extremely mature, stable and nearly universal format. I'd have questions about any modern tool that cannot unzip any current variation. I haven't needed alternate versions since.... the 1990s?

Robert at ID-Tasker
Brainiac
April 26, 2024

IDML file is a "basic" ZIP archive.

 

I'm not a Mac user - but can't you assign IDML extension to your preferred unzip'ing tool?