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

Renaming files with new wildcard functionality

Expand Messages
  • John Shotsky
    I d like to use the new wildcard functionality to rename photo files from jpeg to jpg. I have a defined working folder, and all images are in that folder. What
    Message 1 of 7 , Sep 17, 2012
    • 0 Attachment
      I'd like to use the new wildcard functionality to rename photo files from jpeg to jpg. I have a defined working folder,
      and all images are in that folder. What would be the command to rename *..jpeg to *.jpg? I don't know the individual
      file names, but I guess we could create an array if necessary and loop through it. Just not clear if this can be done
      via wildcard. If it can't be done via normal means, I will write a dos rename command to execute the requirement.
      Thanks,
      John




      [Non-text portions of this message have been removed]
    • John Shotsky
      As an update to this question, I attempted to use the dos function to do my bidding. It does rename the files, but it gives an error message that no output
      Message 2 of 7 , Sep 17, 2012
      • 0 Attachment
        As an update to this question, I attempted to use the dos function to do my bidding. It does rename the files, but it
        gives an error message that 'no output' was created. That is, it did the right thing, but said it didn't. The user must
        dismiss the error message. Not acceptable.
        The command I use is:
        ^$GetDosOutput(rename "^%EbookPath%*.jpeg" "*.jpg)$
        But with debug on, I see a /c after the rename command, which is an invalid switch for the rename command. I don't know
        how it gets there, it's not part of my variable name, which is a standard D:\Folder\ format. So, it appears that NoteTab
        is throwing in a switch that is causing an error window to appear, even though it is executing what I want. Any ideas?

        Sometimes, it seems that nothing is easy. The simplest things can drive you nuts. I tried using a DOS CMD command, but
        that didn't work at all. I have to wonder why. C'mon, this is simple file renaming stuff, and it's so hard to do that a
        25 year computer administrator can't figure it out.(Although it is EASY if I do it manually from the command line.) I do
        NOT want to install yet another foreign application simply to rename a few files occasionally. If I sound frustrated,
        it's because I AM. A little assistance in the help system might make it more clear. All it says is that wild cards are
        not supported, but it's not clear whether that is old terminology since the 'new' wildcard functions were added. Hours
        wasted. Not happy. Fortunately, I have a good supply of wine, and a decent football game to watch while I observe the
        unusable results of my fumbling around.

        Regards,
        John
        RecipeTools Web Site: <http://recipetools.gotdns.com/> http://recipetools.gotdns.com/

        From: ntb-clips@yahoogroups.com [mailto:ntb-clips@yahoogroups.com] On Behalf Of John Shotsky
        Sent: Monday, September 17, 2012 19:14
        To: ntb-clips@yahoogroups.com
        Subject: [Clip] Renaming files with new wildcard functionality


        I'd like to use the new wildcard functionality to rename photo files from jpeg to jpg. I have a defined working folder,
        and all images are in that folder. What would be the command to rename *..jpeg to *.jpg? I don't know the individual
        file names, but I guess we could create an array if necessary and loop through it. Just not clear if this can be done
        via wildcard. If it can't be done via normal means, I will write a dos rename command to execute the requirement.
        Thanks,
        John



        [Non-text portions of this message have been removed]



        [Non-text portions of this message have been removed]
      • John Shotsky
        I finally figure out how to do this, but could never get the GetDosOutput command to work without errors. It always inserts that /c into the command line,
        Message 3 of 7 , Sep 18, 2012
        • 0 Attachment
          I finally figure out how to do this, but could never get the 'GetDosOutput' command to work without errors. It always
          inserts that /c into the command line, which throws an error message.

          In case anyone else has a need to rename files with a clip easily, assuming the working folder is known:
          ^!Dos ren "^%EbookPath%*.jpeg" *.jpg
          ^!Wait

          Regards,
          John
          RecipeTools Web Site: http://recipetools.gotdns.com/


          -----Original Message-----
          From: ntb-clips@yahoogroups.com [mailto:ntb-clips@yahoogroups.com] On Behalf Of John Shotsky
          Sent: Monday, September 17, 2012 20:26
          To: ntb-clips@yahoogroups.com
          Subject: RE: [Clip] Renaming files with new wildcard functionality

          As an update to this question, I attempted to use the dos function to do my bidding. It does rename the files, but it
          gives an error message that 'no output' was created. That is, it did the right thing, but said it didn't. The user must
          dismiss the error message. Not acceptable.
          The command I use is:
          ^$GetDosOutput(rename "^%EbookPath%*.jpeg" "*.jpg)$
          But with debug on, I see a /c after the rename command, which is an invalid switch for the rename command. I don't know
          how it gets there, it's not part of my variable name, which is a standard D:\Folder\ format. So, it appears that NoteTab
          is throwing in a switch that is causing an error window to appear, even though it is executing what I want. Any ideas?

          Sometimes, it seems that nothing is easy. The simplest things can drive you nuts. I tried using a DOS CMD command, but
          that didn't work at all. I have to wonder why. C'mon, this is simple file renaming stuff, and it's so hard to do that a
          25 year computer administrator can't figure it out.(Although it is EASY if I do it manually from the command line.) I do
          NOT want to install yet another foreign application simply to rename a few files occasionally. If I sound frustrated,
          it's because I AM. A little assistance in the help system might make it more clear. All it says is that wild cards are
          not supported, but it's not clear whether that is old terminology since the 'new' wildcard functions were added. Hours
          wasted. Not happy. Fortunately, I have a good supply of wine, and a decent football game to watch while I observe the
          unusable results of my fumbling around.

          Regards,
          John
          RecipeTools Web Site: <http://recipetools.gotdns.com/> http://recipetools.gotdns.com/

          From: ntb-clips@yahoogroups.com [mailto:ntb-clips@yahoogroups.com] On Behalf Of John Shotsky
          Sent: Monday, September 17, 2012 19:14
          To: ntb-clips@yahoogroups.com
          Subject: [Clip] Renaming files with new wildcard functionality


          I'd like to use the new wildcard functionality to rename photo files from jpeg to jpg. I have a defined working folder,
          and all images are in that folder. What would be the command to rename *..jpeg to *.jpg? I don't know the individual
          file names, but I guess we could create an array if necessary and loop through it. Just not clear if this can be done
          via wildcard. If it can't be done via normal means, I will write a dos rename command to execute the requirement.
          Thanks,
          John



          [Non-text portions of this message have been removed]



          [Non-text portions of this message have been removed]



          ------------------------------------

          Fookes Software: http://www.fookes.com/
          NoteTab website: http://www.notetab.com/
          NoteTab Discussion Lists: http://www.notetab.com/groups.php

          ***
          Yahoo! Groups Links
        • Axel Berger
          ... I can t confirm that. I just tried it out with a batch of mine, that does nothing but echo its parameters (ideal for renaming to something that s called by
          Message 4 of 7 , Sep 18, 2012
          • 0 Attachment
            John Shotsky wrote:
            > but could never get the 'GetDosOutput' command to work without
            > errors. It always inserts that /c into the command line, which
            > throws an error message.

            I can't confirm that. I just tried it out with a batch of mine, that
            does nothing but echo its parameters (ideal for renaming to something
            that's called by something else for debugging that call) and your "/c"
            was not added. It did throw your error though. As explained in help,
            GetDosOutput takes the output to StdErr and my batch as well as many
            other commands does not write anything there, it only writes to StdOut.

            Axel
          • John Shotsky
            If you set debug on, you will see the command it is issuing. I could find no way to prevent that /c. Regards, John RecipeTools Web Site:
            Message 5 of 7 , Sep 18, 2012
            • 0 Attachment
              If you set debug on, you will see the command it is issuing. I could find no way to prevent that /c.

              Regards,
              John
              RecipeTools Web Site: <http://recipetools.gotdns.com/> http://recipetools.gotdns.com/

              From: ntb-clips@yahoogroups.com [mailto:ntb-clips@yahoogroups.com] On Behalf Of Axel Berger
              Sent: Tuesday, September 18, 2012 05:37
              To: ntb-clips@yahoogroups.com
              Subject: Re: [Clip] Renaming files with new wildcard functionality


              John Shotsky wrote:
              > but could never get the 'GetDosOutput' command to work without
              > errors. It always inserts that /c into the command line, which
              > throws an error message.

              I can't confirm that. I just tried it out with a batch of mine, that
              does nothing but echo its parameters (ideal for renaming to something
              that's called by something else for debugging that call) and your "/c"
              was not added. It did throw your error though. As explained in help,
              GetDosOutput takes the output to StdErr and my batch as well as many
              other commands does not write anything there, it only writes to StdOut.

              Axel



              [Non-text portions of this message have been removed]
            • Pete Turner
              G day John, ... A couple of things: Is the missing closing double quote after *.jpg missing in your actual code, or just in the post? Also, have you tried
              Message 6 of 7 , Sep 18, 2012
              • 0 Attachment
                G'day John,

                > ^$GetDosOutput(rename "^%EbookPath%*.jpeg" "*.jpg)$

                A couple of things:

                Is the missing closing double quote after "*.jpg missing in your actual code, or just in the post?

                Also, have you tried enclosing the entire command in double quotes, e.g.

                ^$GetDosOutput("rename "^%EbookPath%*.jpeg" "*.jpg"")$


                Pete


                -----Original Message-----
                From: ntb-clips@yahoogroups.com [mailto:ntb-clips@yahoogroups.com] On Behalf Of John Shotsky
                Sent: Tuesday, 18 September 2012 12:56
                To: ntb-clips@yahoogroups.com
                Subject: RE: [Clip] Renaming files with new wildcard functionality

                As an update to this question, I attempted to use the dos function to do my bidding. It does rename the files, but it
                gives an error message that 'no output' was created. That is, it did the right thing, but said it didn't. The user must
                dismiss the error message. Not acceptable.
                The command I use is:
                ^$GetDosOutput(rename "^%EbookPath%*.jpeg" "*.jpg)$
                But with debug on, I see a /c after the rename command, which is an invalid switch for the rename command. I don't know
                how it gets there, it's not part of my variable name, which is a standard D:\Folder\ format. So, it appears that NoteTab
                is throwing in a switch that is causing an error window to appear, even though it is executing what I want. Any ideas?

                Sometimes, it seems that nothing is easy. The simplest things can drive you nuts. I tried using a DOS CMD command, but
                that didn't work at all. I have to wonder why. C'mon, this is simple file renaming stuff, and it's so hard to do that a
                25 year computer administrator can't figure it out.(Although it is EASY if I do it manually from the command line.) I do
                NOT want to install yet another foreign application simply to rename a few files occasionally. If I sound frustrated,
                it's because I AM. A little assistance in the help system might make it more clear. All it says is that wild cards are
                not supported, but it's not clear whether that is old terminology since the 'new' wildcard functions were added. Hours
                wasted. Not happy. Fortunately, I have a good supply of wine, and a decent football game to watch while I observe the
                unusable results of my fumbling around.

                Regards,
                John
                RecipeTools Web Site: <http://recipetools.gotdns.com/> http://recipetools.gotdns.com/

                From: ntb-clips@yahoogroups.com [mailto:ntb-clips@yahoogroups.com] On Behalf Of John Shotsky
                Sent: Monday, September 17, 2012 19:14
                To: ntb-clips@yahoogroups.com
                Subject: [Clip] Renaming files with new wildcard functionality


                I'd like to use the new wildcard functionality to rename photo files from jpeg to jpg. I have a defined working folder,
                and all images are in that folder. What would be the command to rename *..jpeg to *.jpg? I don't know the individual
                file names, but I guess we could create an array if necessary and loop through it. Just not clear if this can be done
                via wildcard. If it can't be done via normal means, I will write a dos rename command to execute the requirement.
                Thanks,
                John



                [Non-text portions of this message have been removed]



                [Non-text portions of this message have been removed]



                ------------------------------------

                Fookes Software: http://www.fookes.com/
                NoteTab website: http://www.notetab.com/
                NoteTab Discussion Lists: http://www.notetab.com/groups.php

                ***
                Yahoo! Groups Links
              • joy8388608
                Hi John, Thanks for the followup and actual solution. I do have a few clips that retrieve output from DOS so I know how difficult it is to figure out those
                Message 7 of 7 , Sep 19, 2012
                • 0 Attachment
                  Hi John,

                  Thanks for the followup and actual solution.

                  I do have a few clips that retrieve output from DOS so I know how difficult it is to figure out those GetDosOutput and GetOutput commands... the help on them is not great.

                  IMHO, I do think that your ^!Dos solution is the correct one. Since the rename command does not produce output, the Get[Dos]Output commands are NOT the ones that should be used in this case.

                  Joy


                  --- In ntb-clips@yahoogroups.com, "John Shotsky" <jshotsky@...> wrote:
                  >
                  > I finally figure out how to do this, but could never get the 'GetDosOutput' command to work without errors. It always
                  > inserts that /c into the command line, which throws an error message.
                  >
                  > In case anyone else has a need to rename files with a clip easily, assuming the working folder is known:
                  > ^!Dos ren "^%EbookPath%*.jpeg" *.jpg
                  > ^!Wait
                  >
                  > Regards,
                  > John
                Your message has been successfully submitted and would be delivered to recipients shortly.