Regular Expessions, The Undescore Char, Bulk Rename Utility
-
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.
Why PERL? Use standard regex to find matches and then do a replace...
Skipper: We'll fix it. Alex: Fix it? How you gonna fix this? Skipper: Grit, spit and a whole lotta duct tape.
-
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.
-
C-P-User-3 wrote:
Evidently, that character has special meanings and powers in the PERL syntax.
If so, escape it.
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
-
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.
-
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.
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.
-
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.
-
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.
Bassam Abdul-Baki wrote:
My first thought was ugly GUI and my second was amazing GUI.
Mind reader ? Exact same thoughts here.
-
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.
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 ?
-
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.
-
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 ?
-
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.
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!
-
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.
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.