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

22020RE: [Clip] Merging two files

Expand Messages
  • Art Kocsis
    Aug 25, 2011
    • 0 Attachment

      Your original question was quite clear in what you wanted.

      The process is quite simple and short:
      Set the delimiter to ^P
      Input each file into separate arrays
      Append each array element (in sequence), and output to the new file.
      BTW, the meat of this was all detailed in the clips I sent you in Feb.

      ^!SetListDelimiter ^P
      ^!SetArray %File1%=^$GetFileText("^%oldFile1%")$
      ^!SetArray %File2%=^$GetFileText("^%oldFile2%")$
      ;Execute the next line for all element of the arrays i = 1, 2, ... max
      ^!AppendtoFile ^%newFile% ^%File1^%i%%^%File2^%i%%^%nl%

      Obviously, you have to define the file name variables and check for unequal
      # of array elements and other conditions.

      Namaste', Art

      At 08/25/2011 13:53, you wrote:
      >1. some text but there might be more
      >2. some more text. and there might be more
      >1. 80
      >2. 90
      >Result wanted:
      >1. some text but there might be more 80
      >2. some more text. and there might be more 90
      >Appending places file2 contents at the bottom of the file1 - not what is
      >This needs to run as an automated clip, with no user interaction. The
      >files are in place, and their names are known to
      >the system. Just looking for the most efficient way to do it.
      >-----Original Message-----
      >From: ntb-clips@yahoogroups.com [mailto:ntb-clips@yahoogroups.com] On
      >Behalf Of Don
      >Sent: Thursday, August 25, 2011 13:05
      >To: ntb-clips@yahoogroups.com
      >Subject: Re: [Clip] Merging two files
      >Can you make up a quick example?
      >There is of course an append command.
    • Show all 10 messages in this topic