Ok so i hope someone can help. i have a bunch of video files and when they are downloaded they have a bunch of extra crap in the file name. some of the same (say for example ) downloaded TV shows are already in folders and these folders keep to the same naming convention as the video files them selfs.

I have downloaded and ran "FileBot" this looks at all the video files that are in there own folder and also ones that are not in there own folder. it then cross references the current name that may have a period between words as well as a bunch of extra stuff like the quality or the group who released it. it then looks on the TVDB site and comes back and says for example tv show you have downloaded named ( Coopers.Treasure.S01E02.Dead.Silence.XviD-AFG) should really be (Cooper's Treasure - 1x02 - Dead Silence) and this worked wonderful but if the file is already in its own folder from the download and that folder is named after the original file it leaves the folder name alone.

What i need to do is find a way to run an app or something that will look at the file inside of the folder grab the files name and then rename its containing folder to the exact same name as the file with in it. again for example: i have a folder called
( Coopers.Treasure.S01E02.Dead.Silence.XviD-AFG) and with in that folder the actual video file name has been corrected and is (Cooper's Treasure - 1x02 - Dead Silence) i need to find a way to change the containing folder name to match that of the corrected file name.

Now every file is different as they are different shows as well as released by different groups so the only consistent point of reference i can use for the folder name is the actual file inside.

This is a huge pain in the butt to have to go and do this one by one as i have a lot to do. Please tell me that there is something out there that will do this for me.

I have an app that will take all files not in folders and place them in a folder and name the folder after the file. but it does not do anything to a folder name that is already created. any help if not an app then maybe a script? my mac skills are not as good as my windows skills seeing how i have been supporting a windows pc environment for 13+ years. Thanks in advance