Rename and move files based on parent folder?

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

Rename and move files based on parent folder?

Postby Ceetch » Mon Mar 12, 2018 8:20 pm

I have a set of files that got extracted into their own subfolders. I'd like to move all these files to the parent folder, but each of the files has the same name (the folder has the unique name), so I'd like to see if I can rename all the files based on the name of the folder they're in and then move them all to the root folder. Is this even possible?
Example:
I current have...
/blue/file001.jpg
/red/file001.jpg
/yellow/file001.jpg

and I want to have...
/blue.jpg
/red.jpg
/yellow.jpg

Each folder only has the one file inside it and they all share the same root folder.
Ceetch
 
Posts: 3
Joined: Sun May 28, 2017 1:31 am

Re: Rename and move files based on parent folder?

Postby Ceetch » Mon Mar 12, 2018 9:04 pm

I managed to figure it out. Prepend the parent folder name, remove current name, and then move renamed files to root folder.
Ceetch
 
Posts: 3
Joined: Sun May 28, 2017 1:31 am

Re: Rename and move files based on parent folder?

Postby Admin » Mon Mar 12, 2018 11:41 pm

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

Re: Rename and move files based on parent folder?

Postby chromathegreat » Tue May 01, 2018 3:28 pm

Can you describe a bit more how you did that? I'm trying to do the same thing, but I'm having some trouble. I have a bunch of files with gibberish names, inside of folders with names that make sense. I'd like to copy the folder names and overwrite the file names.

Thanks in advance!
chromathegreat
 
Posts: 1
Joined: Tue May 01, 2018 3:21 pm

Re: Rename and move files based on parent folder?

Postby therube » Tue May 01, 2018 6:43 pm

Renaming Options (menu item), Ignore - File Extensions, uncheck if checked

2:Name
Remove

9:Append Folder Name
Name-> Prefix
Levels-> 1

Maybe also, if it affects you...

12:Filters
uncheck Folders, leaving Files selected
therube
 
Posts: 1314
Joined: Mon Jan 18, 2016 6:23 pm


Return to BRU Support