Change file names inside folder

Bulk Rename Utility How-To's

Change file names inside folder

Postby magolalipson » Tue Feb 23, 2021 10:32 pm

Hi Guys,

I am using Bulk for a few years just for easy staff.
Now I am organizing some libraries, but I am thinking to do some complex operations that I don't know where to start.

I have a Library in windows (Folder with folders inside and many kinds of files inside, .jpg .png .hdr (all folders contain .hdr))
I have been renamed the folders and now I would like to rename one file inside of each folder with the name of the folder up.

Ex: c:/SolarSystem/earth/country/38468fsfsdfwe.hdr
To: c:/SolarSystem/earth/country/country.hdr

I have thousands of folder so… Anyone know aanything any advice? Or is just not possible?

Thanks
magolalipson
 
Posts: 3
Joined: Tue Feb 23, 2021 10:20 pm

Re: Change file names inside folder

Postby magolalipson » Tue Feb 23, 2021 10:53 pm

I mean to clarify I need to copy the name from the folder automatically, each folder is different so I need to make and expression or something to tell Bulk that:
Each file with .hdr extension inside in a folder have to be change with the name of the folder where it is, and if there is 2 or more files .hdr add _001.hdr / _002.hdr.

Do you think is possible?

Thanks
magolalipson
 
Posts: 3
Joined: Tue Feb 23, 2021 10:20 pm

Re: Change file names inside folder

Postby Luuk » Wed Feb 24, 2021 5:24 am

This possible, but needing two separate renames, because first.hdr--->folder.hdr, but second.hdr--->folder_001.hdr

The first rename makes all the .hdr like... folder.hdr, folder_1.hdr, folder_2.hdr, folder_3.hdr, ...
First to put a checkmark in the menu "Renaming Options, Prevent Duplicates".
Filters(12) needs checkmark only in "Files" and "Subfolder", then also *.hdr inside "Mask".
AppendFolderName(9) needs Name=Prefix, Levels=1.
Name(2) is Remove.


The second rename makes all the numbers padded with three numbers, so folder_1.hdr--->folder_001.hdr
First to click "Reset"
Filters(12) needs checkmark only in "Files" and "Subfolder", then also *.hdr inside "Mask"
RegEx(1) with checkmark in "v2" and the Match and Replace like...
_(\d)$(?X)_(\d\d)$
_00$1(?X)_0$1
Luuk
 
Posts: 699
Joined: Fri Feb 21, 2020 10:58 pm


Return to How-To