Create/run a script to rename the topic's file name to the topic's Title

Are you missing a feature? Request its implementation here.
PattiMc
Posts: 2
Joined: Thu Jan 30, 2025 4:54 pm

Create/run a script to rename the topic's file name to the topic's Title

Post by PattiMc »

(Oxygen XML Author v26.0)
Hi,
We have a large amount of content converted from an other system, and unfortunately the filenames were converted to GUIDs and also placed in esoteric numeric folders. It would help us greatly if we could locate (and later reorganize), but first we really want to rename them to something more useful. I realize we can't rename exactly to what they were previously, but performing something similar to "Change topic ID to file name" operation , i.e, change file name to topic's title would be extremely useful.
Or, is it even possible to run a script that changes the Topic's Title id to become the same as the Topic's Title, and then run the "Change topic ID to File name" operation?
Time is critical for us, so rather than waiting for an official application enhancement, is there a script out there that either accomplishes this, or one that could easily be edited to accommodate our needs?
TIA
Radu
Posts: 9431
Joined: Fri Jul 09, 2004 5:18 pm

Re: Create/run a script to rename the topic's file name to the topic's Title

Post by Radu »

Hi,
We do not have a builtin tool in Oxygen to change the topic and map file names based on their inner titles.
I did create a sample unofficial script some time ago in Python so maybe that will be useful for anything:
https://blog.oxygenxml.com/topics/use-t ... names.html
The script attempts to also change links between files to take into account the file name changes.
Please backup your original files before beginning.
Afterwards you should use the "Validate and check for completion" action from the DITA Maps Manager view on the main DITA Map to make sure the script did not add extra validation errors.
As for folder names, maybe you can use our "Main Files" support and rename the folders directly from the Oxygen Project view.
https://www.oxygenxml.com/doc/versions/ ... files.html

Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
PattiMc
Posts: 2
Joined: Thu Jan 30, 2025 4:54 pm

Re: Create/run a script to rename the topic's file name to the topic's Title

Post by PattiMc »

That's great. Thanks Radu!
Post Reply