Rename filename with numbers and a period in it

Hi,

I would like to create a rename preset that does the following.
Many of my files are named as follows:

01. blabla
02. moreblabla
03. blablatoo
04.blablawithoutspace

and I would like to create a rename script that renames such files to:
01 - blabla
02 - moreblabla
03 - blablatoo
04 - blablawithoutspace

I have been trying this for a few hours now, but I am clearly missing the point of how to replace that period with " -" (and ideally to add a space if there is no space between the period and the rest of the name, but this does not occur that often, so I could correct this manually).

What would this script look like?

Mode: Regular Expressions
Old Name: ^(\d+)\. *(.+)
New Name: \1 - \2

If your files really don't have any extensions, as in your example, turn off Ignore extension so that the 4th example works; otherwise it shouldn't matter if it's on or off.

1 Like

Thanks, that works perfectly! It also is very instructional to see how it works, thank you.

1 Like