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

Re: [NTB] Appending data

Expand Messages
  • dvdwriters12
    The clips works. But it should be inserting the filename of the active document into the footer.htm file for use on the webserver. So it could be the
    Message 1 of 8 , Dec 7, 2004
    • 0 Attachment
      The clips works.

      But it should be inserting the filename of the active document into the "footer.htm" file for use on the webserver.

      So it could be the links.htm page that is currently open in notetab and if that is the case it should put the link (NOT Contents) "http://www.domain.com/links.htm" into the file "footer.htm".

      The problem is that none of the functions I can see return just purely the filename - they return it as:

      C:\Temp\somefile.htm

      So is there a command to return it as (with out using strcpys):

      somefile.htm

      It seems simple enough but I cant find the command.
    • Pete Turner
      ... From the Help file: ^$GetFileName(FileName)$ Returns the name and extension of FileName (without path). Pete
      Message 2 of 8 , Dec 7, 2004
      • 0 Attachment
        > The problem is that none of the functions I can see return
        > just purely the filename - they return it as:
        >
        > C:\Temp\somefile.htm
        >
        > So is there a command to return it as (with out using strcpys):
        >
        > somefile.htm
        >
        > It seems simple enough but I cant find the command.


        From the Help file:

        ^$GetFileName(FileName)$
        Returns the name and extension of FileName (without path).


        Pete
      • hsavage
        ... the footer.htm file for use on the webserver. ... and if that is the case it should put the link (NOT Contents) http://www.domain.com/links.htm into
        Message 3 of 8 , Dec 7, 2004
        • 0 Attachment
          dvdwriters12 wrote:
          >
          > The clips works.
          >
          > But it should be inserting the filename of the active document into
          the "footer.htm" file for use on the webserver.
          >
          > So it could be the links.htm page that is currently open in notetab
          and if that is the case it should put the link (NOT Contents)
          "http://www.domain.com/links.htm" into the file "footer.htm".
          >
          > The problem is that none of the functions I can see return just
          purely the filename - they return it as:
          >
          > C:\Temp\somefile.htm

          dvd,

          You have the command, contained in the script I edited.

          Let me define the objective, as I understand it, to make sure I know
          what you want to do.

          • You have a file, e.g., c:\links.htm, loaded into NoteTab.

          • You have a file, e.g., c:\footer.htm, not loaded.

          • You want to add a link to the bottom of c:\footer.htm referring back
          to c:\links.htm, the file you're viewing, minus the path.


          If this is the objective, either of the following 2 clips will do the job.

          Clip 1 requires no interaction other than running the clip. Clip 2
          shows the clip wizard as you had it in the original clip.

          These 2 lines are exactly what is appended to c:\footer.htm.

          <a href="http://www.domain.com/links.htm" target="_blank">NewPage</a>
          <a href="http://www.domain.com/links.htm" target="_blank">NewPage</a>


          H="Append Simple1"
          ^!AppendToFile "L:\footer.htm" ^%nl%<a
          href="http://www.domain.com/^$GetFileName(^##)$" target="_blank">NewPage</a>


          H="Append Simple2"
          ^!AppendToFile "L:\footer.htm" ^%nl%^?{UPDATE SITE FOOTER WITH ACTIVE
          DOCUMENT NAME=<a href="http://www.domain.com/^$GetFileName(^##)$"
          target="_blank">NewPage</a>}

          --
          ºvº
          04.12.07 09:08 p
          hrs > hsavage@...
        • dvdwriters12
          Hrs, You are correct I tried those and they work. Many thanks!
          Message 4 of 8 , Dec 8, 2004
          • 0 Attachment
            Hrs,

            You are correct I tried those and they work.

            Many thanks!
          Your message has been successfully submitted and would be delivered to recipients shortly.