I use Flex Renamer for this. The interface isn't very straight forward and you have to know RegEx which is hard if you've never dealt with it before. But once you get the hang of it and do some RegEx tutorials and save your queries, it's a very powerful program.
I mainly use it to batch rename files that were not named properly when imported.
For example in your situation, you check the Recursive Sub Folders option and then sort by filename then size.
I use Flexible Renamer to rename my TV rips to S01E01 format which usually fixes it for TV. For Movies make sure your title (filename) is as accurate as possible.