Rename as folder/file name

Hi guys,

I'm certain this has been answered before but I can't find the post.

I have a load of folders named "2008_XXX" which contains only one .avi file and one .srt file. I want to rename the .avi and .srt files with the same name as the folder name so I end up with:

..\2008_Steve\2008_Steve.avi
..\2008_Steve\2008_Steve.srt

..\2008_Daniel\2008_Daniel.avi
..\2008_Daniel\2008_Daniel.srt

Also, I need to do almost the opposite of this. I have a load of files named "2009_Kerys.avi", "2009_Dave.avi" etc. which I want to move to a new folder with the same name as the file name (minus the extension of course).

..\2009_Kerys.avi --> ..\2009_Kerys\2009_Kerys.avi
..\2009_Dave.avi --> ..\2009_Dave\2009_Dave.avi

Thanks in advance,

Roly

Rename - Regular Expression
Old Name: i.(.*)[/i]
New Name: \1\\1.\2

Part 2 solved... awesome. Thanks Miran.

oups, I thought the first part was already working and only the other way round was your request.

for the first part:
Rename - Standard rename
check "Enable file information fields"
Old name: *
New name: {parent}.{ext}

Part 1 solved... awesome. Thanks Miran :slight_smile: