GP SoftwareTwitter
Opus FAQsManualCommandsObjects

Attempting to remove first four characters


#1

Rename PATTERN=(....)(.+) TO=\2 FINDREP @NODESELECT

I heard this was the regex way to do it, but I'm missing something.

Help?


#2

My button has this code...

Rename REGEXP PATTERN="....(.+)" TO="\1"

#3

This one (from buttons section) removes x chars from left, second code from right:

Rename TYPE=files REGEXP PATTERN ".(.+)(\..*)#{dlgstring|How many chars to remove from left:}" TO "\1\2" AUTORENAME
Rename TYPE=files REGEXP PATTERN "(.+).(.*)(\..*)#{dlgstring|How many chars to remove from right:}" TO "\1\3" AUTORENAME

#4

You really want the dynamic renamer script! :slight_smile: (shameless plug fun).

It makes it easy to test out substitutions and pattern matches. Here I told it to replace the first 4 characters with nothing:



#5

Thank you sirs. Got it working!

For future visitors, Dynamic Script is at


#6

Well, my ignorance is showing again. I installed ActivePerl 64 bit and imported the latest version of Dynamic Renamer.orp but it does not work for me (see below). In fact, my screen does not look like @MrC since the script appears in mine and not his. Can someone/MrC educate me on what I'm doing wrong. I tried it with both a file and a folder and nothing happens. The reason why I was intrigued is because of the functionality like removing contents within brackets.

I apologize if this is not the correct thread to post to.

thank you,



#7

The first character of all transformations is a dash, not dot:

-/....//

#8

Thank you. It worked.


#9

Just wondering @MrC, why do I see the Perl script and yours doesn't?


#10

For the screenshot, I dragged the script portion of the window to be minimal size.