Forum: CAT Tools Technical Help
Topic: How to translate file names?
Poster: Samuel Murray
Post title: @Hans
Another (faster) option:
Once you've got the list of paths, you can use regex to turn this:
D:\DXF files\AB1234567_Machine_Maintenance.dxf
into this:
FileMove ("D:\DXF files\AB1234567_Machine_Maintenance.dxf", "D:\new\DXF files\AB1234567_Machine_Maintenance.dxf", 9)
Then load the script itself as the source file in your CAT tool, and mark everything as untranslatable except for the second instance of "AB1234567_Machine_Maintenance.dxf". Does your CAT tool have that ability? (Or: save the script in a format that allows you to mark text as untranslatable, e.g. Microsoft Word with hidden text, and then load that into the CAT tool).
So you're essentially "translating" the script with all the commands and paths in it already. Then, when the translation is done, you save as target, and run the script immediately.
If your CAT tool can translate specific Excel columns, then instead of using untranslatable text you can add tabs like this:
FileMove ("D:\DXF files\AB1234567_Machine_Maintenance.dxf", "D:\new\DXF files\ [tab] AB1234567_Machine_Maintenance [tab] .dxf", 9)
...and load it as an Excel file in which you translate the second column into the second column. Make sure Excel doesn't break the quote characters.
Of course, whether you need to exclude the codes and/or the file extensions and convert the underscores to spaces and back, either outside or inside the CAT tool, would depend on your CAT tool's capabilities.
Topic: How to translate file names?
Poster: Samuel Murray
Post title: @Hans
Another (faster) option:
Once you've got the list of paths, you can use regex to turn this:
D:\DXF files\AB1234567_Machine_Maintenance.dxf
into this:
FileMove ("D:\DXF files\AB1234567_Machine_Maintenance.dxf", "D:\new\DXF files\AB1234567_Machine_Maintenance.dxf", 9)
Then load the script itself as the source file in your CAT tool, and mark everything as untranslatable except for the second instance of "AB1234567_Machine_Maintenance.dxf". Does your CAT tool have that ability? (Or: save the script in a format that allows you to mark text as untranslatable, e.g. Microsoft Word with hidden text, and then load that into the CAT tool).
So you're essentially "translating" the script with all the commands and paths in it already. Then, when the translation is done, you save as target, and run the script immediately.
If your CAT tool can translate specific Excel columns, then instead of using untranslatable text you can add tabs like this:
FileMove ("D:\DXF files\AB1234567_Machine_Maintenance.dxf", "D:\new\DXF files\ [tab] AB1234567_Machine_Maintenance [tab] .dxf", 9)
...and load it as an Excel file in which you translate the second column into the second column. Make sure Excel doesn't break the quote characters.
Of course, whether you need to exclude the codes and/or the file extensions and convert the underscores to spaces and back, either outside or inside the CAT tool, would depend on your CAT tool's capabilities.