How to remove some different parts of file name for massive files

Thanks a lot for such amazing software that makes my life much easier.

Currently, I am using the rename features (Find and replace) as fine and do what I need but there are a lot of things I do it manually because I do not know how to do it using the software.

I have a lot of files that I need to rename it or exactly to remove some parts of its file name.

The problem that these parts are not exactly the same but it is the same length of characters and in the same place.

Is it possible to do it?

I tried searching other threads but was not able to achieve it myself and I am not good with coding yet (by the way if you may tell me what language I need to learn in order to deal with the software for custom scripts).

Is it possible that any valued member of the community or staff tell me how to do it or give me any script that may do so?

Example:

let's say we have 10 files as follow:

2652630178_265 - title
2662630179_266 - title
.....

I want to only remove the 1st part of the file name that is before the _

It is 10 characters followed by _

It will always have the _ at the end but the length of the characters may differ as it may be more or less than 10 characters any other time but always will have the _ at the end.

It will always be different characters .. so it is doable using the software or not?

So the end result will be the rest of the file name after the _
266 - title
...

Thanks a lot for your valuable time and much appreciated.

KK!

Mode: Regular Expressions
Old Name: ^([^_]+)_(.*)$
New Name: \2

If that regex looks complicated, here is an easier to understand, but slightly less accurate, version:

Mode: Regular Expressions
Old Name: (.*)_(.*)
New Name: \2

The first version will work better if there are multiple _ characters in the filename, or if the name starts with a _ character and should be ignored.

Note that if you wanted to remove a fixed-length prefix, there is a much easier way to do that. This handles variable-length prefixes.

1 Like

Leo
I am really impressed indeed
Thanks a lot and too much appreciated
Please, may you just explain (if possible) what are these codes represents? and if I want to learn what is the programming language used?
Thanks a lot and totally much appreciated.

Here is a good place to start:

1 Like

Thanks a lot and much appreciate.

Hi
What if the file name is:
e4bZDdygQ_http www.youtube.com watch v=E_e4bZDdygQ_Excel VBA Introduction Part 51.6 - Pivot Charts.mp4
And I want to only keep Excel VBA Introduction Part 51.6 - Pivot Charts.mp4

Assuming it's always in the form xxx_xxx_xxx_Name you can use the following regex:

Mode: Regular Expressions
Old Name: ^(.*_){3}(.*)$
New Name: \2

1 Like

Yes Jon, it will always be in that form.
Thanks a lot :slight_smile:
I LOVE THIS SOFTWARE INDEEEEEEEEEEEED :smile: