How to Remove everything after a part of an extension

Bulk Rename Utility How-To's

How to Remove everything after a part of an extension

Postby dreamcactus2987-65 » Sat May 30, 2020 9:09 am

So ive got the current issue i need to remove parts from an extension , goes like so >

gauss_rifle.decl;advancedScreenViewShake

gauss_rifle.decl;frappindontyunjumps


i need everything to be removed after .decl


thanks in advance guys
dreamcactus2987-65
 
Posts: 6
Joined: Sat May 30, 2020 9:01 am

Re: How to Remove everything after a part of an extension

Postby dreamcactus2987-65 » Sat May 30, 2020 9:11 am

ive got thousands of files with such naming that needs said removal done too
dreamcactus2987-65
 
Posts: 6
Joined: Sat May 30, 2020 9:01 am

Re: How to Remove everything after a part of an extension

Postby RegexNinja » Sat May 30, 2020 9:44 am

There's a couple different ways, but Regex is probably the safest.
You'll also need to enable: RenamingOptions / FileExtensions / RenameFileExtensions

#1Regex Match/Replace:
^(.*\.decl)[^\.]+$
\1
RegexNinja
 
Posts: 134
Joined: Fri Feb 21, 2020 5:26 pm

Re: How to Remove everything after a part of an extension

Postby dreamcactus2987-65 » Sat May 30, 2020 9:47 am

i did it alot more basic , but does the same trick


set .decl in filter , then regex , select files , subfolders , set name and path length to 999 is to select in crop :after and input .decl and make sure under renaming options > rename file extensions as being part of the filename and make sure the other option for folders is disable


was abit quick to give up , lols
dreamcactus2987-65
 
Posts: 6
Joined: Sat May 30, 2020 9:01 am

Re: How to Remove everything after a part of an extension

Postby RegexNinja » Sat May 30, 2020 11:03 am

Crop shouldn't be a problem, just know that:

Crop method:
if.decl.is.anywhere.in.name.decl;xyz -----> if.decl

Regex method:
if.decl.is.anywhere.in.name.decl;xyz ----> if.decl.is.anywhere.in.name.decl
RegexNinja
 
Posts: 134
Joined: Fri Feb 21, 2020 5:26 pm

Re: How to Remove everything after a part of an extension

Postby dreamcactus2987-65 » Sat May 30, 2020 5:36 pm

well thats quite interesting info to know , thanks alot for that my dude , you got em skillz for sure , ill be checking out all the other goodies you guys got for bulk rename going on 8)
dreamcactus2987-65
 
Posts: 6
Joined: Sat May 30, 2020 9:01 am


Return to How-To


cron