Skip to main content
Participant
October 13, 2022
Question

Is there a Script to bulk-rename files in a book?

  • October 13, 2022
  • 3 replies
  • 534 views

We have a situation in the company where we translate into 9 languages. Those in charge have determined that the language code must appear in the source files for the book, and our translation team currently has to:

  1. Rename the book file with the language code replacing EN for English.
  2. Open the book file, and all files in the book.
  3. Select and rename each file in the book with the language code, allowing FrameMaker to update all x-refs.
  4. Close and same the files and book.

The format of our filenames is, for example, Template002EN01-01-Title.fm where the EN represents English, and would be replaced with ZH for Chinese.

Does there exist a scrit that one could execute from within FrameMaker after opening the book and files that would take as input a code to replace for EN and rename the files in an automated batch?

This topic has been closed for replies.

3 replies

Be.eM
Inspiring
October 14, 2022

Exactly this function was provided by the [i]-Frame script collection (for FrameScript) from itl AG (Germany). Renaming all book components, while updating all cross references at the same time. I'm using it regularly, it's a real time saver. However, it looks like they're no longer selling it…

K.Daube
Community Expert
Community Expert
October 13, 2022

Convince «those in charge» that it would be much more reasonable (safe, economic)  to name only the book with the language. The book + document should be in an own directory per language anyhow. 

Inspiring
October 13, 2022

I completely agree with you, Klaus.

That is exactly what I did in a similar situation.

LinSims
Community Expert
Community Expert
October 13, 2022

I don't think so, but I'm sure someone like @frameexpert or Bernard Aschwanden or @Russ Ward could write one pretty easily.

 

Or you could use Explorer to do a bulk rename in the directory and then use Rick's PathChanger script to update the cross-references and the like. A little more manual than you're hoping for and external to FM, but still a LOT faster than doing it file by file in multiple books.

Participant
October 13, 2022

Thank you. I will look at the PathChanger script, but I want to find a solution that can easily be run by a less-experienced FrameMaker user who is essentially assembling a translated book from MIF files after usinf DejaVu translation software. I don't want to put a solution in place that's overly complicated or intimidating to less-saavy users.