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

Rename/Move

Expand Messages
  • layman999
    Hi, This clip works but it s not showing the file name in the Move Wizard. It s only showing the path. I d like to see the file name in the Wizard whether or
    Message 1 of 6 , Dec 5, 2011
    • 0 Attachment
      Hi,

      This clip works but it's not showing the file name in the Move Wizard.
      It's only showing the path. I'd like to see the file name in the Wizard
      whether or not I cancel the first half of the clip. What am I doing wrong?

      Thanks.

      ^!RenameDoc ^?{Type new name or cancel to move with same name}
      ^!IfCancel Move
      :Move
      ^!MoveFile "^$GetDocName$" "^?{(T=D)}"
    • flo.gehrke
      ... Two proposals... ... ^!MoveFile ^?{(T=D)Move ^$GetFileName(^$GetDocName$)$ to:} or... ... ^!SetWizardLabel Move ^$GetFileName(^$GetDocName$)$ to...
      Message 2 of 6 , Dec 5, 2011
      • 0 Attachment
        --- In ntb-clips@yahoogroups.com, layman999 <layman999@...> wrote:
        >
        > This clip works but it's not showing the file name in the Move
        > Wizard. It's only showing the path. I'd like to see the file name
        > in the Wizard whether or not I cancel the first half of the clip.
        >
        > ^!RenameDoc ^?{Type new name or cancel to move with same name}
        > ^!IfCancel Move
        > :Move
        > ^!MoveFile "^$GetDocName$" "^?{(T=D)}"

        Two proposals...

        :Move
        ^!MoveFile ^?{(T=D)Move ^$GetFileName(^$GetDocName$)$ to:}

        or...

        :Move
        ^!SetWizardLabel Move ^$GetFileName(^$GetDocName$)$ to...
        ^!MoveFile ^?{(T=D)}

        Regards,
        Flo
      • layman999
        Thanks, Flo; I think I prefer the bold text in the wizard created by your second proposal. Is that a result of using ^!SetWizardLabel ? I don t see bold text
        Message 3 of 6 , Dec 5, 2011
        • 0 Attachment
          Thanks, Flo;

          I think I prefer the bold text in the wizard created by your second
          proposal. Is that a result of using ^!SetWizardLabel ?

          I don't see 'bold text' mentioned in the Help file in regards to using
          ^!SetWizardLabel .

          And one other question: What's going on with ^$GetFileName and
          ^$GetDocName ?

          Seems like they should both do the same thing.

          Thanks.

          On 12/5/2011 11:11 AM, flo.gehrke wrote:
          >
          > --- In ntb-clips@yahoogroups.com <mailto:ntb-clips%40yahoogroups.com>,
          > layman999 <layman999@...> wrote:
          > > I'd like to see the file name
          > > in the Wizard whether or not I cancel the first half of the clip.
          > >
          > > ^!RenameDoc ^?{Type new name or cancel to move with same name}
          > > ^!IfCancel Move
          > > :Move
          > > ^!MoveFile "^$GetDocName$" "^?{(T=D)}"
          >
          > Two proposals...
          >
          > :Move
          > ^!MoveFile ^?{(T=D)Move ^$GetFileName(^$GetDocName$)$ to:}
          >
          > or...
          >
          > :Move
          > ^!SetWizardLabel Move ^$GetFileName(^$GetDocName$)$ to...
          > ^!MoveFile ^?{(T=D)}
          >
          > Regards,
          > Flo
          >
          >


          [Non-text portions of this message have been removed]
        • layman999
          Oops! I didn t actually test the MoveFile part of either of those clips by moving a file before my last response. I m getting a clip syntax error for that line
          Message 4 of 6 , Dec 5, 2011
          • 0 Attachment
            Oops!

            I didn't actually test the MoveFile part of either of those clips by
            moving a file before my last response. I'm getting a clip syntax error
            for that line on both of these clips when I try to move the file.

            On 12/5/2011 11:11 AM, flo.gehrke wrote:
            >
            > --- In ntb-clips@yahoogroups.com <mailto:ntb-clips%40yahoogroups.com>,
            > layman999 <layman999@...> wrote:
            > >
            > > This clip works but it's not showing the file name in the Move
            > > Wizard. It's only showing the path. I'd like to see the file name
            > > in the Wizard whether or not I cancel the first half of the clip.
            > >
            > > ^!RenameDoc ^?{Type new name or cancel to move with same name}
            > > ^!IfCancel Move
            > > :Move
            > > ^!MoveFile "^$GetDocName$" "^?{(T=D)}"
            >
            > Two proposals...
            >
            > :Move
            > ^!MoveFile ^?{(T=D)Move ^$GetFileName(^$GetDocName$)$ to:}
            >
            > or...
            >
            > :Move
            > ^!SetWizardLabel Move ^$GetFileName(^$GetDocName$)$ to...
            > ^!MoveFile ^?{(T=D)}
            >
            > Regards,
            > Flo
            >
            >


            [Non-text portions of this message have been removed]
          • Axel Berger
            ... No. Referring to the clip help I find: ^$GetDocName$ ^$GetDocName(Index)$ (added in v4.52) Returns the active document name, if no index is specified, or
            Message 5 of 6 , Dec 5, 2011
            • 0 Attachment
              layman999 wrote:
              > And one other question: What's going on with ^$GetFileName and
              > ^$GetDocName ?

              No. Referring to the clip help I find:

              ^$GetDocName$
              ^$GetDocName(Index)$ (added in v4.52)
              Returns the active document name, if no index is specified, or the
              document name at specified index position. An invalid index number
              returns an empty string. The first document is at index 1.

              What is not said here, but becomes apparent once used, is, that not just
              the name is returned but rather the complete full path.

              ^$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.

              So to get just the file and not the full path you need

              ^$GetFileName(^$GetDocName$)$

              Axel
            • flo.gehrke
              ... Sorry, ^!MoveFile needs a file name and a destination. So you could write... ... ^!SetWizardLabel Move ^$GetFileName(^$GetDocName$)$ to... ^!MoveFile ^##
              Message 6 of 6 , Dec 5, 2011
              • 0 Attachment
                --- In ntb-clips@yahoogroups.com, layman999 <layman999@...> wrote:
                >
                > Oops!
                >
                > I didn't actually test the MoveFile part of either of those
                > clips by moving a file before my last response. I'm getting a
                > clip syntax error...

                Sorry, ^!MoveFile needs a file name and a destination. So you could write...

                :Move
                ^!SetWizardLabel Move ^$GetFileName(^$GetDocName$)$ to...
                ^!MoveFile "^##" "^?{(T=D)}"

                Note that you have to close the file and open it anew at its new position when repeating that action (use ^!SetDebug to see why).

                > I think I prefer the bold text in the wizard created by your
                > second proposal. Is that a result of using ^!SetWizardLabel ?

                Yes, I think so. I can see no way to avoid bold text here.

                > And one other question: What's going on with ^$GetFileName and
                > ^$GetDocName ?

                See Axel's explanation. You can easily test such functions with...

                ^!Info ^$GetFileName(^$GetDocName$)$

                resp.

                ^!Info ^$GetDocName$

                Regards,
                Flo
              Your message has been successfully submitted and would be delivered to recipients shortly.