Batch convert compressed (.zrtf) to not compressed (.rtf)
Batch convert compressed (.zrtf) to not compressed (.rtf)
Is there a way to batch change the ‘Nisus Compressed Rich Text’ documents to ‘Rich Text Format (RTF)’ and if so, how? Thank you!
- martin
- Official Nisus Person
- Posts: 5230
- Joined: 2002-07-11 17:14:10
- Location: San Diego, CA
- Contact:
Re: Batch convert compressed (.zrtf) to not compressed (.rtf
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".
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:
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.find . -name "*.zrtf" -exec sh -c 'gunzip < "{}" > "{}.rtf"' \;