Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

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

Community Beginner ,
Oct 13, 2022 Oct 13, 2022

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?

TOPICS
Scripting
484
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Oct 13, 2022 Oct 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.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Oct 13, 2022 Oct 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.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Oct 13, 2022 Oct 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. 

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Contributor ,
Oct 13, 2022 Oct 13, 2022

I completely agree with you, Klaus.

That is exactly what I did in a similar situation.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Enthusiast ,
Oct 14, 2022 Oct 14, 2022
LATEST

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…

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines