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

Re: [Clip] Re: Opening multiple files into one

Expand Messages
  • Sheri
    ... I noticed the above sets an array variable that ends with the letter s but tries to read it using a variable name that is missing the s . Untested, but
    Message 1 of 7 , Jun 5, 2009
    • 0 Attachment
      ebbtidalflats wrote:
      > John,
      >
      > All suggested solutions are essentially the same.
      > They just have more or less fluff.
      >
      > The essence of combining several files into one
      > using notetab is:
      >
      > ;1. set your path before the following code
      > ^!Set %path%=^?{(t=D)browse to the desired folder}
      >
      > ;2. collect the filenames (include paths)
      > ^!SetListDelimiter |
      > ^!SetArray %allfiles%=^$GetFiles(^%path%;*.html)$
      >
      > ;3. Select the files you want to append (one line)
      > ^!SetArray %selections%=^?{(T=A;H=^%allfiles0%)Select files=^%allfiles%}
      >
      > ;4. loop through the filelist to insert the
      > files into the current document
      > (or append them to an external file)
      >
      > :loop
      > ^!InsertFile ^%selection^%selection0%%
      > ^!Dec %selection0%
      > ^!If ^%selection0%>0 loop
      >
      > Note that this loop is where the various solutions differ.
      > Using a separate variable to track which file to insert
      > lets you insert files in any order. The above solutions
      > inserts the files in reverse order. I urge you to read
      > up on the ^$GetFiles function in the help file.
      >
      >
      >
      > Eb
      >
      > --- In ntb-clips@yahoogroups.com, "ebbtidalflats" <ebbtidalflats@...> wrote:
      >
      >> If you know how to do it in DOS cou could use the Shell command
      >> (just kidding), or try the following (I don't have NoteTab running, so the functions below are guesses, and of course you'll have to provide a place for the inserts, and a home for the clipcode):
      >>
      >> ^!SetListDelimiter |
      >> ^!SetArray %allfiles%=^$GetFiles(path to folder)$
      >> ^!SetArray %selections%=^?{(T=A;H=^%allfiles0%)Select files}
      >> :loop
      >> ^!InsertFile ^%selection^%selection0%%
      >> ^!Dec %selection0%
      >> ^!If ^%selection0%>0 loop
      >>
      >> Cheers,
      >>
      >> Eb
      >>
      >>
      I noticed the above sets an array variable that ends with the letter "s"
      but tries to read it using a variable name that is missing the "s".
      Untested, but that's not going to work.

      Regards,
      Sheri
      >> --- In ntb-clips@yahoogroups.com, "John Shotsky" <jshotsky@> wrote:
      >>
      >>> I have an application that places many .html files into a folder. I would like to open them into a single document, all
      >>> concatenated together without opening the individual files separately. Is this possible in NoteTab? (I know how to do it
      >>> with Dos, but I'd rather just do a multi-select and grab only the files I select.)
      >>>
      >
      >
    • ebbtidalflats
      ... Thanks for pointing this out. Don t know how that could have happened ;). I got a wireless keyboard. You don t suppose someone else is typing on the same
      Message 2 of 7 , Jun 7, 2009
      • 0 Attachment
        --- In ntb-clips@yahoogroups.com, Sheri <silvermoonwoman@...> wrote:
        >
        > ebbtidalflats wrote:
        > >> ^!SetListDelimiter |
        > >> ^!SetArray %allfiles%=^$GetFiles(path to folder)$
        > >> ^!SetArray %selections%=^?{(T=A;H=^%allfiles0%)Select files}
        > >> :loop
        > >> ^!InsertFile ^%selection^%selection0%%
        > >> ^!Dec %selection0%
        > >> ^!If ^%selection0%>0 loop

        > I noticed the above sets an array variable that ends with the letter "s"
        > but tries to read it using a variable name that is missing the "s".
        > Untested, but that's not going to work.
        >
        > Regards,
        > Sheri



        Thanks for pointing this out. Don't know how that could have happened ;). I got a wireless keyboard. You don't suppose someone else is typing on the same frequency?

        Fastes fix, remove the s in the array declaration.

        Cheers

        Eb
      Your message has been successfully submitted and would be delivered to recipients shortly.