Page 1 of 1

Batch convert compressed (.zrtf) to not compressed (.rtf)

Posted: 2013-02-27 06:41:39
by foster13
Is there a way to batch change the ‘Nisus Compressed Rich Text’ documents to ‘Rich Text Format (RTF)’ and if so, how? Thank you!

Re: Batch convert compressed (.zrtf) to not compressed (.rtf

Posted: 2013-02-27 12:15:15
by martin
I'm attaching a macro that handles batch converting compressed ZRTF files to regular RTF. It will ask you to select a folder, after which it will convert all ZRTF files in that folder (but not its subfolders). All the converted files will be placed into a subfolder called "converted".
Batch Convert ZRTF to RTF.nwm
(21.04 KiB) Downloaded 401 times
Because ZRTF files are mostly just compressed RTF, you could also run an unzip command to convert them. For example, in the Finder you can rename "file.zrtf" to "file.rtf.zip" and then just double-click to extract it. This could be automated from the Terminal/shell by changing to the folder you want to convert and using something like:
find . -name "*.zrtf" -exec sh -c 'gunzip < "{}" > "{}.rtf"' \;
The only caveat I'd add to extracting ZRTF files directly is that the RTF used inside is quite optimized and uses some space saving techniques that not all applications will support. For example, instead of hex escaping images they will be saved using the "\bin" RTF control, which not all applications handle. However, if you're just reopening these extracted RTF files in Nisus Writer there won't be any problems.

Re: Batch convert compressed (.zrtf) to not compressed (.rtf

Posted: 2013-02-28 13:26:56
by foster13
Thank you!