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

Read Files without opening

Expand Messages
  • prlproductmanager
    I m sure I m doing a clip as slowly as possible, but I can t figure out how to speed it up. Here is what my clip does now: Open this big huge tab-delimited
    Message 1 of 3 , Apr 25 8:49 AM
    • 0 Attachment
      I'm sure I'm doing a clip as slowly as possible, but I can't figure
      out how to speed it up.

      Here is what my clip does now:
      Open this big huge tab-delimited file.
      Find a certain variable.
      Grab its line (into an array to get all variables in line)
      Delete the line.
      Save and close the big huge file.
      Put the line information into a small destination html file.

      The clip may need to loop 1-n times until all of the lines containing
      the variable are found, copied, deleted, and inserted into the
      destination file. Also, the loop actually performs on 5 different
      files, getting relevant information for %variable% from each file.

      This is A) Time consuming and B)causing Out of Memory errors.

      Can I read and delete a line without opening the file? Any other ways
      I could speed this up?
      thanks in advance,
      Rayellen
    • John Zeman
      ... This sounds like a pretty heavy duty request. Off the top of my head I can t think of a way to streamline it with NoteTab other than to insert the
      Message 2 of 3 , Apr 25 3:36 PM
      • 0 Attachment
        --- In ntb-clips@yahoogroups.com, "prlproductmanager" <rayellen.gilles@v...> wrote:
        >
        > I'm sure I'm doing a clip as slowly as possible, but I can't figure
        > out how to speed it up.
        >
        > Here is what my clip does now:
        > Open this big huge tab-delimited file.
        > Find a certain variable.
        > Grab its line (into an array to get all variables in line)
        > Delete the line.
        > Save and close the big huge file.
        > Put the line information into a small destination html file.
        >
        > The clip may need to loop 1-n times until all of the lines containing
        > the variable are found, copied, deleted, and inserted into the
        > destination file. Also, the loop actually performs on 5 different
        > files, getting relevant information for %variable% from each file.
        >
        > This is A) Time consuming and B)causing Out of Memory errors.
        >
        > Can I read and delete a line without opening the file? Any other ways
        > I could speed this up?
        > thanks in advance,
        > Rayellen


        This sounds like a pretty heavy duty request. Off the top of my head I can't think of a way to streamline it with NoteTab other than to insert the "^!SetScreenUpdate Off" command into the clip at the point where it actually starts processing the documents. That should speed it up a bit and save some system resources which may reduce the out of memory error messages.

        NoteTab does have the ^$GetFileText(FileName)$ function that would let you read the text of an unopened file into a variable, but I'd be surprised if doing it that way helped you in any significant way.

        John
      • hsavage
        ... Rayellen, How large is huge ? If you re using Windows what version are you using, how much ram does your system have, free hard drive space, size of the
        Message 3 of 3 , Apr 25 4:53 PM
        • 0 Attachment
          prlproductmanager wrote:

          >
          > I'm sure I'm doing a clip as slowly as possible, but I can't figure
          > out how to speed it up.
          >
          > Here is what my clip does now:
          > Open this big huge tab-delimited file.
          > Find a certain variable.
          > Grab its line (into an array to get all variables in line)
          > Delete the line.
          > Save and close the big huge file.
          > Put the line information into a small destination html file.
          >
          > The clip may need to loop 1-n times until all of the lines containing
          > the variable are found, copied, deleted, and inserted into the
          > destination file. Also, the loop actually performs on 5 different
          > files, getting relevant information for %variable% from each file.
          >
          > This is A) Time consuming and B)causing Out of Memory errors.
          >
          > Can I read and delete a line without opening the file? Any other ways
          > I could speed this up?
          > thanks in advance,
          > Rayellen

          Rayellen,

          How large is 'huge'? If you're using Windows what version are you
          using, how much ram does your system have, free hard drive space, size
          of the pagefile, referred to as virtual memory?

          If you reply paste your clip into the email. Also, give us examples of
          the variables sought after and a small portion of the 'huge' file you're
          working on.

          Are the variables ever-changing, do you have to enter them one at a
          time, give a few examples? Or, are the sought for variables the same
          each time?

          I don't know of a way to find a variable, select the line containing the
          variable, copy it to another file, continue to search for and delete
          other lines containing that variable without actually loading the file.

          ºvº
          05.04.25
          hrs > hsavage@...
        Your message has been successfully submitted and would be delivered to recipients shortly.