rename the middle of the file, where some strings vary

Bulk Rename Utility How-To's

rename the middle of the file, where some strings vary

Postby andywsz » Tue Oct 22, 2024 8:03 pm

Hi all,

I have a ton of files containing a string I want to remove, but the middle of the string, the for numbers are different almost each time. Here is an example:
"kontakt lista_DiskStation_Oct-18-0733-2024_DownloadConflict.xls"
I want to rename all files to this: "kontakt lista.xls"

Not only that but a copy this result file is already in the folder which I want to overwrite with the renamed version!
Any help, please!
andywsz
 
Posts: 3
Joined: Tue Oct 22, 2024 7:57 pm

Re: rename the middle of the file, where some strings vary

Postby andywsz » Tue Oct 22, 2024 8:15 pm

I think removing the last 46 characters will just do what I want. Ok, how to to that?
andywsz
 
Posts: 3
Joined: Tue Oct 22, 2024 7:57 pm

Re: rename the middle of the file, where some strings vary

Postby Admin » Tue Oct 22, 2024 11:00 pm

To remove the last 46 chars you can use Remove (5) -> last n
Admin
Site Admin
 
Posts: 2883
Joined: Tue Mar 08, 2005 8:39 pm

Re: rename the middle of the file, where some strings vary

Postby Admin » Tue Oct 22, 2024 11:03 pm

To remove all text after the first _ use File Segment -> From: _ with File Name (2) -> Remove.
Admin
Site Admin
 
Posts: 2883
Joined: Tue Mar 08, 2005 8:39 pm

Re: rename the middle of the file, where some strings vary

Postby Admin » Tue Oct 22, 2024 11:04 pm

In the renaming options, you can set BRU to overwrite target renamed file if it already exists.
Admin
Site Admin
 
Posts: 2883
Joined: Tue Mar 08, 2005 8:39 pm

Re: rename the middle of the file, where some strings vary

Postby andywsz » Wed Oct 23, 2024 11:57 am

Great, thanks, it worked. Just changed 16000 filenames:-)
andywsz
 
Posts: 3
Joined: Tue Oct 22, 2024 7:57 pm

Re: rename the middle of the file, where some strings vary

Postby Admin » Wed Oct 23, 2024 11:53 pm

8)
Admin
Site Admin
 
Posts: 2883
Joined: Tue Mar 08, 2005 8:39 pm


Return to How-To