Loading ...
Sorry, an error occurred while loading the content.

22024RE: [Clip] Merging two files

Expand Messages
  • Art Kocsis
    Aug 27, 2011
    • 0 Attachment
      I posted the specific method and code that you want two days ago!



      At 08/27/2011 09:00, you wrote:
      >I want this to be a completely automatic process with no manual
      >intervention. It is just one bit in a long string of
      >clips. As in my example, I'm just adding page numbers to the end of every
      >line. As I mentioned, I have a way to do it,
      >but I don't think it's very efficient ­ copying file2 to the bottom of
      >file1, then moving each line, one by one, until
      >file2 lines are all gone.
      >I want a general purpose method, because there are different cases of what
      >needs to be done. In some cases, each line in
      >file1 and file2 start with the same words, which facilitates the match. In
      >other cases, there will be two files with
      >simply the same number of lines, but I want the same process to occur ­
      >the contents of file2 appear on the ends of each
      >File1 line, but without matching words in file2.
      >Using arrays, it would just add the two arrays together in a single
      >operation with the contents of array 2 pasted onto
      >the ends of the lines in array 1. I just don't know how to code this function.
      >File 1 has 10 lines of varying lengths.
      >File 2 has 10 lines of varying lengths.
      >There is nothing by which to key these lines.
      >The clip should place whatever is in file2 on the ends of the file1 lines.
      >In yet another example, I want to insert the lines in file2 as standalone
      >lines in file1, but in specific, controlled
      >locations. Once I have the basic methodology set up, I can modify how it
      >works to achieve each need.
      >From: ntb-clips@yahoogroups.com [mailto:ntb-clips@yahoogroups.com] On
      >Behalf Of loro
      >Sent: Saturday, August 27, 2011 07:25
      >To: ntb-clips@yahoogroups.com
      >Subject: Re: [Clip] Merging two files
      >John Shotsky wrote:
      > >I'm looking for a standard way to add the contents of a file (file2)
      > >to the ends of the matching lines of another file.
      > >(file1)
      > >
      > >Both files have the same number of lines, and I can begin each line
      > >with a number, such as 1., 2., if needed. Or they
      > >can both start with a unique text name. There will never be
      > >duplicate lines within either file.
      >I'd use the Modify Block tools. You just need to see to that the
      >lines in the document you want to paste the content of the other one
      >into have the same length. Fill them with blanks when needed and add
      >extra spaces for margin if you want two separated columns as the
      >result of the operation. If you don't want two straight columns, but
      >rather want the new line to continue where the first ends, it's easy
      >to remove the extraneous spaces afterwards, by Find % Replace or clip.
    • Show all 10 messages in this topic