[solved] massive renaming merged odt files based on content
Wed, 02 Mar 2016 - 3:18 AM
I’ve created 5.000 odt files by merging a template odt file with data on an odt file. I’ve used two columns as merge fields: name and city.
All the files have the same name with a different number before “.odt”.
I need to rename all these documents based on content, by adding the two fields “name” and “city”, present in the document.
Any ideas about how to do that?
Thanxs!
dani
Fri, 04 Mar 2016 - 5:55 AM
#2
Great, William!. I was using
Great, William!. I was using mail merge assistant but I see this is not the right way. Starting by File->Print there’s no problem to do it as you said. Thanx a lot.
I created and saved a spreadsheet with columns headed by name and city in the first row and data below those headings. I created a column named combined that concatenated the name and city cells. This column will be the file names, so if you want more text in the file name include it here.
I created a writer document and added the name and city fields to the document as mail merge fields this way. Insert/Fields/More Fields, choose Database tab/Mail Merge Fields. I added my name/city/combined spreadsheet as the data source and added the name and city fields to the document in the appropriate places.
I printed the writer document, choosing the Form Letter option and choosing these print settings: Output to File, Save as Individual files. I checked the box to generate filenames from the database and chose my combined field. I chose my output path and file format, then printed to file.
This generated documents with the filename being the combined column content with 0 appended. If there was a name clash the second file had a 1 appended. If all your files are 0 and you don’t want that, then you can use a bulk rename to eliminate it.