Scripting a file name change as a data merge element.

My goal of the work being done with InDesign is to utilize the Data Merge functionality of InDesign and the, already available, ability to create a new document per record in your data source where the docuement name is changed based on data contained in the data source.
A very simple example of this would be the following:
EXAMPLE
======================
Given the following data source in excel:
First_Name
Last_Name
ResultingFileName
George
Smith
c:\A45.pdf
Mary
Lopez
c:\C99.pdf
Steve
Barns
c:\tmp\XM96TR.pdf
Along with a simple two text box InDesign documents, I would perform a standard data merge with First_Name linked to one text box and Last_Name linked to another.  By setting the “Record Limits Per Document” to 1, I would end up with three different documents.  By default, the documents would be named Untiltled-1, Untiltled-2 and Untitled-3. 
Untitled-1 would contain George and Smith.  Untitled-2 would contain Mary and Lopez and Untitled-3 would contain Steve and Barns.
At this point in time, I would run the new created script, which would do the following:
            Rename Untitled-1 to A45 and/or save Untitled-1 as C:\A45.pdf
            Rename Untitled-2 to C99 and/or save Untitled-2 as C:\C99.pdf
            Rename Untitled-3 to XM96TR and/or save Untitled-3 as c:\tmp\XM96TR.pdf
I am open to modifying the manner in which the data merge source is created.  For example, separating the path and the file name into separate columns.  In addition, I am flexible in putting preset information and/or file save types into the data merge document.
Please feel free to contact me directly at [email protected]
Thanks in advance for the help.
Matt

Hi Matt,
I think it’s better to use an XML-based approach for your task.
I’ve never scripted Data Merge process, but I don’t see a straightforward way of doing it. May be you can create the 3rd textbox on pasteboard or a non-printing layer, which will contain the file path from ‘ResultingFileName’ field, and the contents from which can be used for naming & saving the current file and exporting it to pdf-file. But this approach is so clumsy.
Instead, you’d better to keep your data in excel file, or even better Access or some other database program.
Export the data from it in XML-format.
Then import it to an InDesign file and process it by script. XML support is very powerful in InDesign: you can process your data by xml-rules. I once made a script for a newspaper, which processed data for classified ads. The script applied all formatting, changed colors for different headings and placed images.
Kasyan

Similar Messages

  • Using LR 5 on Mac w/ OS 10.9 have several catalogs on several externals with some duplicates and file name changes due to using NIK, elements, LR, etc.  would like to combine or merge into "master" catalogue

    II'm new to forums so be kind and I'm also 70 years old so explain simply.

    Hi rushbo. I am of the opinion that it is much better to save as much information with the files. Use Lightroom to organize and process the images, but keep the data with the images when possible. (There are tradeoffs to this approach, mostly speed and complexity, but it means that there is one place to look for information about a file, even if you have multiple catalogs).
    If you agree with this, first read What Is Not Included In Lightroom XMP Files | Lightroom Fanatic to see what data is not saved.
    Then I would go from the oldest to the newest catalog, and for each turn on "Catalog settings:automatically write changes into xmp" and then save the metadata for all the files in the catalog (Select All; Save Metadata).  You might also want to choose "Delete Rejected Files" to get rid of them permanently.
    Do this for each catalog, and at the end every image will have the settings from the latest catalog (earlier values will be overwritten).
    Then create a new catalog and import the files. This will bring in every image in your directory tree (wherever you store images on your disk). It might even discover some images that aren't in your catalogs. And each image will have the latest data. Finally archive your old catalogs "just in case".
    This process can be slow, so put on a movie...
    A

  • InDesign CS4: File names change to string of numbers

    Occasionally, one of our users will save an InDesign CS4 file, only to have the file name change.  For example, a file originally named "#kwn25501.bcbsNM.indd" was saved as "#kwn25501.bc157-1223857848."
    If the user is not aware that this has happened, things can go horribly, terribly wrong in our production environment. The "numbered" file may be missing key elements, or be somehow be corrupt in some fashion. In one case, this led us to having to reprint a job because the "numbered" file was missing a photo; somehow, that file was used (and perhaps renamed after the fact) to create the final output.
    We use Macs running InDesign CS4 6.0.5. Some of our Macs are running Tiger 10.4.11, while others are running Leopard 10.5.8. The problem seems to related to the Leopard machines, although that is not 100 percent certain at this point. All of these Macs are bound to Active Directory and save files to a Windows 2003 server. I know Adobe recommends against working on files over a network, but perhaps there is an explanation for this file renaming aside from network issues.
    Any light that can be shed on this issue will be greatly appreciated. Thanks!
    Kevin Stauffer

    Check to see if maybe your original filename is the problem.
    You may need that particular name for a workflow reason, but some of the symbols in the middle of your filename are generally not a good idea. Especially working off of a server, file names should be ONLY alpha-numeric characters, no symbols, no periods (except for the file type) and only underscores or dashes to separate words, no spaces.
    The reason is some of those symbols get picked up as machine language and all sorts of bad can happen as a result.
    Message was edited by: Michael Riordan

  • When downloading files the file name changes name?

    When I download files from yahoo email account the file name changes from actual name to securedownlad.doc. Why is this happening and how do I stop it? Is it an email client issue?
    Example:
    Original file name in email to download is called GeorgiaTechstinks.doc
    when downloaded the dl box pops up and file name has changed to securedownload.doc.
    I have to go and manually change file name back to GeorgiaTechstinks.doc
    any help would be greatly appreciated

    See here for information.
    (24629)

  • Photoshop Elements 3.0 Back-Up - File Name Change

    I currently run Photoshop Elements 3.0. When I back-up the catalog from within Photoshop, the file names are changed (i.e 100_2424.JPG to BO00012). All of my Premiere Elements 7 projects point to the original file name. If I ever lost that original JPG file, the back-up file would be recovered, but would not be recognized by Premeiere Elements, and thus not be found. Why does the file name change after back-up? How can I retain the original file name during back-up? Thanks.

    Once you have taken the backup, all the files are renamed as you mentioned in the post. Its only when you restore the catalog through File->Restore, the files are restored by the original name.

  • File name changes when I sync videos

    As title says, when ever I load a video into my 3Gs Iphone the file name changes to a numerical one.
    How do I keep the original file name?
    As it is I can only sync 1 video at a time then rename it before adding another.

    Oops, Just realised I put this n the wrong forum. Just to clarify this is prerecorded video files.

  • CS4 Photoshop.exe file name changes

    Has anyone had the CS4 Photoshop.exe file change names? I have had this happen on a couple of computers, one machine it happened twice. When CS4 is installed, the Photoshop file name is Photoshop.exe, at some point, the file name changes to PHOTOSHOP_CS4.EXE. I'm going to check with our sys admins to make sure they aren't doing some software push that might be changing it, but thought I would post here in case it was a known issue.

    When you find the culprit you might let him know that different Photoshop versions always live in different Program Files subfolders.
    -Noel

  • IPhoto file names changed

    I have just noticed that in several of my events the underlying file name of several imported photos has been changed to my assigned Title.  Since I didn't think Apple provided a way in iPhoto for Mac to change the file name, and I am not digging into the file structure of iPhoto, I can't change the file name back to that assigned by the camera (and I don't necessarily know it anyway).  I see no obvious reason why specific file names were changed.  Is there some non-obvious way to change file names that I accidentally stumble upon?

    iPhoto 9.4.3.  Not sure what you mean by history.  It has been in use for some time.  No other obvious problems.  The file name changes, at least that I have noticed, are from this year and, in particular, this past week.  One other observation is that I only happened to notice because I exported a group of photos and saw that a few of the exported names did not have the camera assigned names and then I looked back at iPhoto (hovering the cursor over the title - which gives the file name).  Again, the files were exported as a group and no obvious reason for something to change for one rather than another file.  It is possible the change took place when I exported the photos rather than earlier as I had no reason to check.

  • Saving/exporting issue in Windows 7-file name changes when trying to navigate

    I just got Windows 7 on my computer and am running ID CS5. The weirdest problem happens when I try to save as or export a file. The dialog box comes up and normally, I would be able to select a folder I want to navigate to just by typing the folder name, but what is happening is that the first letter goes to a folder, but upon typing the second letter, it starts changing the name of my file.
    So for example, I am saving a file ABC.indd and I go to navigate to save it in a folder called Project XYZ. When I type in "P" to get to that folder name, it jumps right to the first folder starting with P. However, upon typing "r" my file name changes from ABC.indd to "r.indd." If I kept typing, it would become "roject XYZ.PDF."
    This happens when saving as a file or if I am exporting a PDF. Our entire marketing department or 6 people was recently upgraded from XP to 7 and we all have this problem in ID. This does not happen in Illustrator or Photoshop and it has our IT department baffled. It is driving us crazy though because we make dozens of files a day and now have to manually scroll through long file structures when exporting PDFs, which is so time consuming, not to mention aggravating.
    In searching for this problem, I found another poster on a different website who has the same issue, but no one had any suggestions.

    Tell whomever is emailing the file to zip it first.

  • File name from an attribute of an element of the payload

    Dear Experts,
    Could you suggest the syntax for specifying the file name from a variable in the file receiver communication channel? I need to grab the file name from an ATTRIBUTE of an element of the payload.
    Thanks a lot.
    Example: Need to pass the attribute "descReceipt" of the element "promotionEvent" to the variable in the following payload:
    <?xml version="1.0" encoding="UTF-8"?>
    <promotionExport>
    <promotionEvent eventIdentifier="30" status="A" descReceipt="FILE1">

    The scenario is IDOC to FILE. I need to get the value of the receiving partner.
    The message header has the node "DynamicConfiguration". Please see the xml below. I need to grab the key RCVPRN (0000002104) from this and pass as the file name in the receiver file adapter.
    How do I setup my receiver file adapter for this? I tried changing the values for the variable, and also enabling the adapter specific message attributes. No solution yet.
    <SAP:DynamicConfiguration xmlns:SAP="http://sap.com/xi/XI/Message/30" xmlns:SOAP="http://schemas.xmlsoap.org/soap/envelope/" SOAP:mustUnderstand="1">
      <SAP:Record namespace="http://sap.com/xi/XI/System/IDoc" name="RCVPOR">LXDCLNT250</SAP:Record>
      <SAP:Record namespace="http://sap.com/xi/XI/System/IDoc" name="SNDPRT">LS</SAP:Record>
      <SAP:Record namespace="http://sap.com/xi/XI/System/IDoc" name="RCVPRN">0000002104</SAP:Record>
      <SAP:Record namespace="http://sap.com/xi/XI/System/IDoc" name="SNDPOR">SAPLCD</SAP:Record>
      <SAP:Record namespace="http://sap.com/xi/XI/System/IDoc" name="SNDPRN">LCDCLNT220</SAP:Record>
      <SAP:Record namespace="http://sap.com/xi/XI/System/IDoc" name="CIMTYP" />
      <SAP:Record namespace="http://sap.com/xi/XI/System/IDoc" name="IDOCTYP">WPDBBY01</SAP:Record>
      <SAP:Record namespace="http://sap.com/xi/XI/System/IDoc" name="MESTYP">WPDBBY</SAP:Record>
      <SAP:Record namespace="http://sap.com/xi/XI/System/IDoc" name="RCVPRT">KU</SAP:Record>
      </SAP:DynamicConfiguration>

  • Files arranged by date added, but changing file name changes date added

    I've got my Downloads folder set to view (in the Finder) by "date added", a very useful feature. However, if I change a file name, the "date added" changes to that new time, and "date modified" stays the same as it was. This doesn't make sense to me... isn't date added just that, when it was added to the folder? Why would this happen? Any workarounds or suggestions?

    You should use the 'File/Directory Info' functionality.
    This will return the last modificatoin of the file.
    Ton
    Free Code Capture Tool! Version 2.1.3 with comments, web-upload, back-save and snippets!
    Nederlandse LabVIEW user groep www.lvug.nl
    My LabVIEW Ideas
    LabVIEW, programming like it should be!

  • Changing File Names w/o Reading Data?

    Hi All,
    I'm trying to get Labview to change the name of files in a directory,
    without having to read the data.
    I'll have a variety of data sets (text, binary, PDF files, etc), and
    would like to rename them.
    Any hints? I tried using the "open/create/replace file.vi" by opening
    the file, read the file, close it, create a new file, write it, close
    it, but it doesn't work. I've also tried "copy" primitive under the
    advanced file functions, but only get new directories created with
    files in them. The following is what I got when I used it:
    For example, the directory “c:\stuff” , will have files
    "file1.aaa, file2.BBB and file3.ccc", if I want to rename
    “file1.aaa” into the file named "1file.AAA" by using the
    "copy" primitive (in the Advanced File Functions), then I get a folder
    called "1file.AAA" with the three files, "file1.aaa, file2.BBB and
    file3.ccc", in them.
    I can manipulate directories, copy files into new ones, but not rename
    files.
    Kind regards,
    -Dorian

    Spaz wrote in message news:<5065000000050000002C710000-1017707437000@exc​hange.ni.com>...
    > The Move.vi works in NT if your 'moving' to the same directory.
    Yes... I figured out what I was doing wrong. Using the "Copy"
    primitive, I was including the file name AND path, which was read as a
    new folder with the name of the file. If I remove the path, it will
    copy the files to the same directory, with the name I wanted.
    Thanks!
    -Dorian

  • When I change meta data, File name changes too

    In iTunes 11.1.3 I have been modifying the Music file ID3 tags (or what ever they're called).  I've found, though, that when I change the song name in the "Get Info" dialog box, it also changes the ACTUAL file name of the song.
    For example.
    I download a a CD and the CD information is downloaded.  Then when I drag the newly created mp3 into iTunes and select "Get Info" to modify all of the information.
    Once i hit Okay or Next.  I watch the File name in Finder change as well.
    How do I keep it from doing this?

    Event Video Guy wrote:
    you are a life saver 
    Event Guy,
    Glad it helped.  (I also do not like iTunes to mess with the filenames.)
    Enjoy the music!
    Ed

  • Redirect to "can't find the i-web page"/file name change

    i published a website thru mobileme (http://www.hale-o-lani-aloha.com). when i type my website address in e-mails and check the link, i sometimes got directed to a page that said "we're sorry but we can't find the i-web page you've requested..." (yes, i've checked my typing!)
    when i created my sitemap (with rage sitemap automator), i was told that the apostrophe in the file name for my first page was probably causing the problem. my file name was"hale o'lani aloha". i changed the file name for the webpage to "hale o lani aloha" and republished, redid the sitemap, etc. i now have 2 sets of files on my i-disk: one for Haleo'LaniAloha and the other for HaleoLaniAloha (i don't know why it's not "HaleoLani"). both sets of files have folders with the individual components of the site, css style sheet, java script and html files. the bad redirect site address has "/Site/HaleoLaniAloha" in the address. (when i checked the "oLani" html file on my i-disk, it opens an incomplete version of my first webpage. however, the "o'Lani" html file opens the fully functioning page). when the links work, the address has "/Site/Haleo_LaniAloha" (the new file name). so that long explanation brings me to my questions:
    - did the apostrophe in my file name truly mess things up?
    - since my fully functioning html file on i-disk has the apostrophe in it, should i rename my file with the apostrophe and delete the non-apostrophe files from my i-disk (even tho the working website has "oLani")?
    thanks for any info that can help clear up this mess!

    You can find import now in the Library:
    *Bookmarks > Show All Bookmarks > Import & Backup > Import Data from Another Browser

  • Should the web page address be included in the file name in the meta data dialog box?

    In the page properties > meta data > below is a field with the label file name: (the the area to type in the field), after the field, it is labeled .html.
    I have 2 questions here.
    1. If I type in http//:www (my page url), do I include .html at the end? I didn't know if this is automatically added because it is off to the side of the field?
    2. If I type in the entire URL address: http//:www (etc, etc).html,    after closing the page properties dialog box, I make it a habit to double check my work. What happens is the http//:www.xxx changes to (htttpwww.xxx). It drops the //: on the URL.
    So would it be better to just type in www.xxx (without the http//:www.xxx)
    and do you type in the .html at the end?
    I am assuming this will help with SEO page ranking or at least makes it easier for the search engines to crawl your site??
    I hope this makes sense.
    Advise would be very helpful.
    Ben

    You are absolutely correct with the URL Ben. Taking your above example, you just need to type in "Services" in the file name and the webpage will be exported as services.html and the URl will be  www.xyz.com/services.html.
    All the webpages (be it parent page or child page) gets physically saved at the root directory of your website on the server (where your website resides).
    This name is just the name of the file using which it is physically stored and called from the server. It does not help search Engines to crawl deeper inside the website.
    As I explained, "name which you wants the .html file to be stored with" here means the name of the physical file which is getting saved on the server.
    Most users leave the file name same as Page name. If you have it different from page name then this will be the workflow :
    Page Name : About
    File Name : test
    domain : www.mysite.com
    Now if you are  using a Menu Widget, it will list "About" in the Menu. And when end user will click on "About" then it will call the file named "test.html" from the server location (where all the files of your website are stored).
    And it will open a page with address "www.mysite.com/test.html"
    Hope I am able to explain the concept of File Name here. Please let us know if you have further queries on this.
    Regards,
    Sachin

Maybe you are looking for

  • Sending a picture...

    All, When I send an mms picture to someone with out a iPhone they don't see the picture. Does anyone know why this would be happening, or having this problem? Message was edited by: Nade 23

  • Synchronizing Outlook calendar with my BB Curve 9300 calendar

    I have problems in setting up synchronization of my Outlook calendar on my PC with the BB calendar. According to the handbook, one has to open the calendar on the BB and then select "Options". Then one should activate synchronization by ticking "wire

  • What is the use and how to use project builder in forms 6i

    Hi, I would like to know the usage of project builder in forms 6i, could anybody explain it......... thanks Bcj

  • HeLp PleAse !! pkadd causing severe pain !!

    Hi all... I'm about to lose my mind with setting up zones in solaris 10 ... So i a praying somebody can please help me.. Currently I am trying to add packages to all zones from a CD. Lets call this package 'X'. Firstly, let me say that so far, pkgpar

  • HELP!!!! GoLive CS2 to Dreamweaver CS4

    I've been using Go Live for sometime I've just purchased a new computer and upgraded all of my softwarre. Go Live won't work on the new computer so I'm having to work out how to use Dreamweaver which is a pain! As a priority I'd like to convert all s