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

Re: [Clip] File paths in clips

Expand Messages
  • Don - htmlfixit.com
    ... Help - Help on Clip Programming - Search Tab || enter filename and hit enter || double click on Disk Files || scroll down until you find this as one of
    Message 1 of 5 , Feb 1 11:53 AM
    • 0 Attachment
      kld1956 wrote:
      >
      > I need to insert the name of a file that I search for, using an Open
      > File dialog box (^?[(t=o) Find file], but I don't want the full file
      > path returned, just the name of the file.
      >
      > Is there a switch or mask that will remove the file path from the
      > text returned?

      Help -> Help on Clip Programming -> Search Tab || enter "filename" and
      hit enter || double click on Disk Files || scroll down until you find
      this as one of the highlighted terms:
      ^$GetFileName(FileName)$
      Returns the name and extension of FileName (without path). Since version
      4.8, this function works both on Windows file names and URLs.
    • Jamal Mazrui
      The following excerpt from the ClipCode documentation describes a function that sounds like it would do the job: ^$GetFileName(FileName)$ Returns the name and
      Message 2 of 5 , Feb 1 12:04 PM
      • 0 Attachment
        The following excerpt from the ClipCode documentation describes a
        function that sounds like it would do the job:

        ^$GetFileName(FileName)$
        Returns the name and extension of FileName (without path). Since version
        4.8,
        this function works both on Windows file names and URLs.



        -----Original Message-----
        From: Don - htmlfixit.com [mailto:don@...]
        Sent: Tuesday, February 01, 2005 2:54 PM
        To: ntb-clips@yahoogroups.com
        Subject: Re: [Clip] File paths in clips



        kld1956 wrote:
        >
        > I need to insert the name of a file that I search for, using an Open
        > File dialog box (^?[(t=o) Find file], but I don't want the full file
        > path returned, just the name of the file.
        >
        > Is there a switch or mask that will remove the file path from the
        > text returned?

        Help -> Help on Clip Programming -> Search Tab || enter "filename" and
        hit enter || double click on Disk Files || scroll down until you find
        this as one of the highlighted terms:
        ^$GetFileName(FileName)$
        Returns the name and extension of FileName (without path). Since version

        4.8, this function works both on Windows file names and URLs.



        Yahoo! Groups Links
      • Don - htmlfixit.com
        ... of course if you keep reading you might find these too ... ^$GetName(FileName)$ Returns the name of FileName (without path or file extension). Since
        Message 3 of 5 , Feb 1 12:17 PM
        • 0 Attachment
          Don - htmlfixit.com wrote:
          > kld1956 wrote:
          >
          >>I need to insert the name of a file that I search for, using an Open
          >>File dialog box (^?[(t=o) Find file], but I don't want the full file
          >>path returned, just the name of the file.
          >>
          >>Is there a switch or mask that will remove the file path from the
          >>text returned?

          of course if you keep reading you might find these too ...
          ^$GetName(FileName)$
          Returns the name of FileName (without path or file extension). Since
          version 4.8, this function works both on Windows file names and URLs.

          ^$GetPath(FileName)$
          Returns the path segment of FileName (always ends with backslash). Since
          version 4.8, this function works both on Windows file names and URLs.


          Of course then I think you might need something like this:
          FileName maybe need to be replaced by ^*, ^**, ^#, or ^## codes to get
          the desired result
          that I don't find well documented and cannot search for in help ...
          every time I need to find special things like that they elude me. Same
          for %NL% and that type of stuff as well.
        • kld1956
          ... Open ... file ... Since ... URLs. ... Since ... URLs. ... get ... Same ... 2005-02-01 kld1956: Thanks for the help. I saw those in the help file but didn t
          Message 4 of 5 , Feb 1 4:26 PM
          • 0 Attachment
            --- In ntb-clips@yahoogroups.com, "Don - htmlfixit.com" <don@h...>
            wrote:
            > Don - htmlfixit.com wrote:
            > > kld1956 wrote:
            > >
            > >>I need to insert the name of a file that I search for, using an
            Open
            > >>File dialog box (^?[(t=o) Find file], but I don't want the full
            file
            > >>path returned, just the name of the file.
            > >>
            > >>Is there a switch or mask that will remove the file path from the
            > >>text returned?
            >
            > of course if you keep reading you might find these too ...
            > ^$GetName(FileName)$
            > Returns the name of FileName (without path or file extension).
            Since
            > version 4.8, this function works both on Windows file names and
            URLs.
            >
            > ^$GetPath(FileName)$
            > Returns the path segment of FileName (always ends with backslash).
            Since
            > version 4.8, this function works both on Windows file names and
            URLs.
            >
            >
            > Of course then I think you might need something like this:
            > FileName maybe need to be replaced by ^*, ^**, ^#, or ^## codes to
            get
            > the desired result
            > that I don't find well documented and cannot search for in help ...
            > every time I need to find special things like that they elude me.
            Same
            > for %NL% and that type of stuff as well.

            2005-02-01 kld1956: Thanks for the help. I saw those in the help file
            but didn't really know what to do with them. Here is how I solved my
            problem:

            ^!set %filename%=^?{(t=o)Get file name}
            ^!find "intro.swf" its
            ^!insert ^$getfilename(^%filename%)$

            The first line lets me find the file name, using an Open File dialog
            box. The third line uses getfilename to strip out the file path.
          Your message has been successfully submitted and would be delivered to recipients shortly.