Remove beginning of filename, everything before the @

Post any Bulk Rename Utility support requirements here. Open to all registered users.

Remove beginning of filename, everything before the @

Postby kizer8 » Thu Sep 17, 2020 2:23 pm

I have a bunch of files that have some date with _@ in the filename, how do i remove everything before the @ and including the @ from the filename and leave just the video file name?2020-05-19_@filename1.mp4 ->filename1.mp42020-06-08_@filename2.mp4 ->filename2.mp42020-07-31_@filename3.mp4 ->filename3.mp42020-09-11_@filename4.mp4 ->filename4.mp42020-09-15_@filename5.mp4 ->filename5.mp42020-09-15_@filename6.mp4 -> filename6.mp4
kizer8
 
Posts: 6
Joined: Fri Aug 28, 2020 1:24 pm

Re: Remove beginning of filename

Postby Admin » Thu Sep 17, 2020 2:28 pm

With the latest version 3.4, use RegEx (1):

Match : %1@%2
Replace: %2

Tick the Simple checkbox to use Simple regex.
Admin
Site Admin
 
Posts: 2351
Joined: Tue Mar 08, 2005 8:39 pm

Re: Remove beginning of filename, everything before the @

Postby kizer8 » Thu Sep 17, 2020 2:43 pm

Thx appreciate the response. Do you know how I would include the Simple feature in the brc.exe command line tool since I am trying to batch script the file renaming?
kizer8
 
Posts: 6
Joined: Fri Aug 28, 2020 1:24 pm

Re: Remove beginning of filename, everything before the @

Postby therube » Thu Sep 17, 2020 4:25 pm

It (the alternative Regex library) doesn't exist for BRC.
therube
 
Posts: 1317
Joined: Mon Jan 18, 2016 6:23 pm

Re: Remove beginning of filename, everything before the @

Postby kizer8 » Thu Sep 17, 2020 4:44 pm

therube wrote:It (the alternative Regex library) doesn't exist for BRC.


Is there any way to chop the filename based on how i need it using the BRC command line tool?
kizer8
 
Posts: 6
Joined: Fri Aug 28, 2020 1:24 pm

Re: Remove beginning of filename, everything before the @

Postby Luuk » Fri Sep 18, 2020 6:59 am

Greetings! Command line is scheduled for "BRC Support" forum, but for the command line it can be like this

Code: Select all
brc64.exe /pattern:*.mp4 /nodup /regexp:@(.*):\1: /execute
Luuk
 
Posts: 699
Joined: Fri Feb 21, 2020 10:58 pm

Re: Remove beginning of filename, everything before the @

Postby kizer8 » Fri Sep 18, 2020 3:33 pm

Luuk wrote:Greetings! Command line is scheduled for "BRC Support" forum, but for the command line it can be like this

Code: Select all
brc64.exe /pattern:*.mp4 /nodup /regexp:@(.*):\1: /execute


Thanks very much, worked perfectly.
kizer8
 
Posts: 6
Joined: Fri Aug 28, 2020 1:24 pm

Re: Remove beginning of filename, everything before the @

Postby therube » Fri Sep 18, 2020 7:19 pm

Ah, so in this case, it is very similar (looking & in concept).
(Though don't know I'd have come up with the actual regex: to do it, or certainly not as easily, quickly.)
therube
 
Posts: 1317
Joined: Mon Jan 18, 2016 6:23 pm


Return to BRU Support