Rename Files and Add Bracket to Years of Movies

Below is an example of how this could be solved with links to to try them out

This will replace the periods

Match = '/[\s\.]/m';
Replace = ' '

This will put brackets around our year

Match = /(.)(\d\d\d\d)/gm;
Replace = `\1(\2)`;

I am currently not on a *nix machine and so am not able to try this out.

But to do this in CLI,

use rnm like this

rnm -y -rs '[Regex]' [FileLocation]

where -y will confirm all changes without asking -rs replace string command ‘[Regex]’ is your regex statement ‘[FileLocation] is where all your directories are. use ./* for all

eg: rnm -y -rs ''s/(.+ )(\d\d\d\d)/\1(\2)/'' ./*

use link below as reference;

CLICK HERE to find out more related problems solutions.

Leave a Comment

Your email address will not be published.

Scroll to Top