Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. The Lounge
  3. Regular Expessions, The Undescore Char, Bulk Rename Utility

Regular Expessions, The Undescore Char, Bulk Rename Utility

Scheduled Pinned Locked Moved The Lounge
phpperlhtmltoolsregex
14 Posts 8 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • C C P User 3

    I am using an app called "Bulk Rename Utility" It can be found [HERE](http://www.bulkrenameutility.co.uk/Main\_Intro.php) It renames a bunch of files (thousands if you want) According to its own documentation, it uses pattern matching, stating... > the syntax supported by this program is the same as that offered by PERL 5 ...with a link to the PERL 5 site [HERE](http://perldoc.perl.org/perlre.html) Could someone who is familiar with that standard please tell me how I can put an underscore character after the letters "DSC" in a file name ? i.e., The "_" character (no quotes) also known as ASCII character 05Fh Evidently, that character has special meanings and powers in the PERL syntax.

    B Offline
    B Offline
    Bassam Abdul Baki
    wrote on last edited by
    #4

    BRU allows you to append it anywhere or replace it. If you're using that, it should allow you a preview of the new filename (assuming you're using the GUI).

    Web - BM - RSS - Math - LinkedIn

    C 2 Replies Last reply
    0
    • P PIEBALDconsult

      C-P-User-3 wrote:

      Evidently, that character has special meanings and powers in the PERL syntax.

      If so, escape it.

      L Offline
      L Offline
      Lost User
      wrote on last edited by
      #5

      PIEBALDconsult wrote:

      If so, escape it

      Escape IT - wish I thort of that much earlier but IT is where I made and still makes money (- though these days freelancing as I choose.) can take the man out of it, but cant take it out of the man. Oops, sorry, not PC (no, not the thing on your desk "PC") can take the person out of it, but cant take it out of the person.

      Sin tack ear lol Pressing the any key may be continuate

      1 Reply Last reply
      0
      • B Bassam Abdul Baki

        BRU allows you to append it anywhere or replace it. If you're using that, it should allow you a preview of the new filename (assuming you're using the GUI).

        Web - BM - RSS - Math - LinkedIn

        C Offline
        C Offline
        C P User 3
        wrote on last edited by
        #6

        You are Correct

        Bassam Abdul-Baki wrote:

        it should allow you a preview of the new filename

        I made an error, and now want to correct it. Certain filenames had a sort of nomenclature like this... > "xxxxxxx_4" *Bulk Rename Utility* successfully removed the "\_4" as I requested (actually, "_\d", no quotes) but it also removed several thousand desirable instances of that pattern which were embedded into other file names. i.e., the desired part is in the middle of other file names, which I did not see on the preview screen when I was targeting the pattern on the end of the file names.

        B 1 Reply Last reply
        0
        • C C P User 3

          You are Correct

          Bassam Abdul-Baki wrote:

          it should allow you a preview of the new filename

          I made an error, and now want to correct it. Certain filenames had a sort of nomenclature like this... > "xxxxxxx_4" *Bulk Rename Utility* successfully removed the "\_4" as I requested (actually, "_\d", no quotes) but it also removed several thousand desirable instances of that pattern which were embedded into other file names. i.e., the desired part is in the middle of other file names, which I did not see on the preview screen when I was targeting the pattern on the end of the file names.

          B Offline
          B Offline
          Bassam Abdul Baki
          wrote on last edited by
          #7

          Then remove from position might be better or backwards replace. They may also have instance count, but I'm not at my desk to verify. I've been using BRU for years. My first thought was ugly GUI and my second was amazing GUI. It really can do anything. Just preview before accepting.

          Web - BM - RSS - Math - LinkedIn

          C 2 Replies Last reply
          0
          • B Bassam Abdul Baki

            BRU allows you to append it anywhere or replace it. If you're using that, it should allow you a preview of the new filename (assuming you're using the GUI).

            Web - BM - RSS - Math - LinkedIn

            C Offline
            C Offline
            C P User 3
            wrote on last edited by
            #8

            Interesting educational activity here on CodeProject. In my previous post, I placed these three bytes in squence ``` Quotation mark " (Ascii 022h) Underscore _ (Ascii 05Fh) The digit 4 (Ascii 034h) Quotation mark " (Ascii 022h) ``` i.e., These four bytes... ``` "_4" ``` The CodeProject website removed the underscore from the screen. A backslash put it back in.

            1 Reply Last reply
            0
            • B Bassam Abdul Baki

              Then remove from position might be better or backwards replace. They may also have instance count, but I'm not at my desk to verify. I've been using BRU for years. My first thought was ugly GUI and my second was amazing GUI. It really can do anything. Just preview before accepting.

              Web - BM - RSS - Math - LinkedIn

              C Offline
              C Offline
              C P User 3
              wrote on last edited by
              #9

              Bassam Abdul-Baki wrote:

              My first thought was ugly GUI and my second was amazing GUI.

              Mind reader ? Exact same thoughts here.

              1 Reply Last reply
              0
              • B Bassam Abdul Baki

                Then remove from position might be better or backwards replace. They may also have instance count, but I'm not at my desk to verify. I've been using BRU for years. My first thought was ugly GUI and my second was amazing GUI. It really can do anything. Just preview before accepting.

                Web - BM - RSS - Math - LinkedIn

                C Offline
                C Offline
                C P User 3
                wrote on last edited by
                #10

                Bassam Abdul-Baki wrote:

                Then remove from position might be better or backwards replace

                No, the filenames are not currently uniform, so the trailing underscore and digit (sometimes there were two digits) could be at position N, N+1, N+2, etc. I don't know how to do a backwards replace. Is that in their help facility ? Can you show me here ?

                B 1 Reply Last reply
                0
                • C C P User 3

                  I am using an app called "Bulk Rename Utility" It can be found [HERE](http://www.bulkrenameutility.co.uk/Main\_Intro.php) It renames a bunch of files (thousands if you want) According to its own documentation, it uses pattern matching, stating... > the syntax supported by this program is the same as that offered by PERL 5 ...with a link to the PERL 5 site [HERE](http://perldoc.perl.org/perlre.html) Could someone who is familiar with that standard please tell me how I can put an underscore character after the letters "DSC" in a file name ? i.e., The "_" character (no quotes) also known as ASCII character 05Fh Evidently, that character has special meanings and powers in the PERL syntax.

                  D Offline
                  D Offline
                  dandy72
                  wrote on last edited by
                  #11

                  What is this monstrosity of a UI? It would be quicker to do this with a quick-and-dirty PowerShell script, IMO.

                  1 Reply Last reply
                  0
                  • C C P User 3

                    Bassam Abdul-Baki wrote:

                    Then remove from position might be better or backwards replace

                    No, the filenames are not currently uniform, so the trailing underscore and digit (sometimes there were two digits) could be at position N, N+1, N+2, etc. I don't know how to do a backwards replace. Is that in their help facility ? Can you show me here ?

                    B Offline
                    B Offline
                    Bassam Abdul Baki
                    wrote on last edited by
                    #12

                    Seems to be more complicated than I remember. Try this: In RegEx (1): Match: (.*)-\d+([^-]+) Replace: \1\2

                    Web - BM - RSS - Math - LinkedIn

                    1 Reply Last reply
                    0
                    • C C P User 3

                      I am using an app called "Bulk Rename Utility" It can be found [HERE](http://www.bulkrenameutility.co.uk/Main\_Intro.php) It renames a bunch of files (thousands if you want) According to its own documentation, it uses pattern matching, stating... > the syntax supported by this program is the same as that offered by PERL 5 ...with a link to the PERL 5 site [HERE](http://perldoc.perl.org/perlre.html) Could someone who is familiar with that standard please tell me how I can put an underscore character after the letters "DSC" in a file name ? i.e., The "_" character (no quotes) also known as ASCII character 05Fh Evidently, that character has special meanings and powers in the PERL syntax.

                      M Offline
                      M Offline
                      Mark_Wallace
                      wrote on last edited by
                      #13

                      C-P-User-3 wrote:

                      Bulk Rename Utility

                      Holy Cr@p![^] That's worse than Kameisi[^] If you're not dealing with multi-byte characters, why not try something more usable, like Lupas Rename[^]?

                      I wanna be a eunuchs developer! Pass me a bread knife!

                      1 Reply Last reply
                      0
                      • C C P User 3

                        I am using an app called "Bulk Rename Utility" It can be found [HERE](http://www.bulkrenameutility.co.uk/Main\_Intro.php) It renames a bunch of files (thousands if you want) According to its own documentation, it uses pattern matching, stating... > the syntax supported by this program is the same as that offered by PERL 5 ...with a link to the PERL 5 site [HERE](http://perldoc.perl.org/perlre.html) Could someone who is familiar with that standard please tell me how I can put an underscore character after the letters "DSC" in a file name ? i.e., The "_" character (no quotes) also known as ASCII character 05Fh Evidently, that character has special meanings and powers in the PERL syntax.

                        J Offline
                        J Offline
                        Joe Woodbury
                        wrote on last edited by
                        #14

                        Perl Special Variables[^] Other than $_, I don't believe underscore has any significance in PERL. Perhaps it's the program itself, not the regex expression.

                        1 Reply Last reply
                        0
                        Reply
                        • Reply as topic
                        Log in to reply
                        • Oldest to Newest
                        • Newest to Oldest
                        • Most Votes


                        • Login

                        • Don't have an account? Register

                        • Login or register to search.
                        • First post
                          Last post
                        0
                        • Categories
                        • Recent
                        • Tags
                        • Popular
                        • World
                        • Users
                        • Groups