[solved] massive renaming merged odt files based on content

2 replies [Last post]
espinho
Offline
Last seen: 10 weeks 4 days ago
Title:
Joined: 31 Oct 2012
Posts: 6
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

William Whalley
Offline
Last seen: 2 days 3 hours ago
Title: ★★★★★
Joined: 21 Dec 2010
Posts: 106
Use form letter output naming controls
I’m not sure exactly what you did, but here’s what I tried using Mail Merge. Perhaps you can adapt.

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.



espinho
Offline
Last seen: 10 weeks 4 days ago
Title:
Joined: 31 Oct 2012
Posts: 6
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.

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.