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

20977[Clip] Re: concatenating html files

Expand Messages
  • diodeom
    Aug 23, 2010
    • 0 Attachment
      Mike Breiding - Morgantown WV <mike@...> wrote:
      > For some reason the clip is not concatenating the files in order.
      > The folders are named d1 through d23
      > In the output file the first text is from D1, the next is D10, then D12,
      > etc.
      > It seems since the folders do not have leading zeros it is not grabbing
      > them in numbered sequence.
      > Does this make sense?
      > Any solutions?
      > It would also be handy to have a line in the clip to strip the HTML
      > although this can be done quickly enough by using the Strip HTML button
      > on the tool bar.
      > Thanks,
      > -Mike

      You could try this approach:

      ^!Menu File/New
      ;Specify folder containing d1 - d?? subfolders
      ^!Set %folder%="^?{(T=D)Directory==^%folder%}"
      ^!Set %i%=0
      ^!Inc %i%
      ^!Set %txt%=^$GetFileText(^%folder%d^%i%\index.php)$
      ^!IfEmpty ^%txt% Done
      ^!Set %txt%=^$StrStripHTML("^%txt%";0)$
      ^!InsertText **** Day ^%i% ****^p^%txt%^p^p
      ^!Goto Loop
      ^!ClearVariable %folder%
      ^!ClearVariable %i%
      ^!ClearVariable %txt%
    • Show all 16 messages in this topic