Rename Parent folder, from fileinfo?

Already sorted my music in folders. Would like to rename the folders " mp3 artist - mp3 album "using the fileinfo of the .mp3 files inside.

Can I do this?

Tried this:

[quote]@nodeselect
Rename {filepath$|..|noterm} TO="{mp3artist} - {mp3album}" FILEINFO[/quote]

And this one works well for moving the files to a new folder and renaming that folder using the fileinfo. But if I could I'd like to rename the already existing parent, rather then re-create, and delete the old one..

@NoDeselect Rename FILEINFO PATTERN="*.*" TO="{mp3artist} - {mp3album}\{mp3track|#2} {mp3title}.{ext}"

There's an example of how to do this in the Rename Scripting forum and another one in the FAQs.

Thanks leo, I've gone through those 2 sections, mostly I had read before, but now with a fine tooth comb, and I still can't work it out. :blush:

There are a few mentions about moving to the folder and renaming that new folder, like the one I coded into a toolbar button above. Also a few threads about renaming parent folders from child names. But nothing about renaming a existing parent folder from child's fileinfo.

I'm not saying this information is not there, just that I can not find it, or I am misunderstanding what it is I should be looking at.

FAQ, closest threads I can find: Add the current date and time to a file's name

And rename presets, is this thread,, Sort music files and go to the target folder which is also moving, but maybe i can mod it to rename just the parent folder path so it moves into and replaces the old parent folder? Is that the way I should be trying?

Sorry probably a really dumb simple question. :blush:

I usually do it by moving the files into the new folder, then just delete the old one. (That's what the FAQs etc. describe. Sorry, didn't see that it wasn't what you wanted before.)

If you need to rename the old folder instead (e.g. because it has other files in it that don't have music tags) then it can be done using a rename script. I think there is an example of how to do it somewhere but not sure where off the top of my head, and don't have time to find it right now...

I've finally finished this, after eventually trying from another angle and playing for a bit I think I have it working smoothly. It's a workaround, probably not the best way to do it, but just couldn't find an answer for it. But works for now! Will tidy it up and post later if any one wants.

It renames the selected folder from a child music file, which is what I was after. Also have it naming the parent of a selected file.

And yeah, the rename and move to folder button is good. But for me, it's not ideal as I already have all the music sorted into their folders (but the names just aren't perfect since updating the tags). Plus, each folder (the lossless version anyway) has a rip report text file that I need to keep with it, and in both versions (I keep copies in mp3 and lossless) have cover images. So moving only the music files to a new folder means I'd have to move the extra files manually and then move the folder up a level and delete the old one.