I've got a folder called "Movies" with several subfolders inside it, each having the title of a movie + a description as a name, let's say: "Blue Velvet (1986) - The Criterion Collection".
Inside each movie subfolder there's a number of files, typically a video file (with extensions such as .mkv, .mp4, .avi, .wmv etc.), a subtitle file (.srt extension) and sometimes a .jpg image. Those files have an alternative format of the movie title as a name, different than the name of the folder they are into e.g "Blue Velvet - David Lynch (1986)".
What I want to achieve is:
1. Create a text file inside each movie subfolder. The text file should have the exact same name with the subfolder in question.
then (I don't mind the order but I'm not sure the steps could be performed in the opposite direction)
2. Rename the movie subfolder, having it adopting the same name with the video (without the extension of course).
Or to put it in another way, since AFAIK there's not such thing as renaming folders when it comes to cmd and bat files but moving files between folders instead, I'd like to create a text file named after the movie subfolder then move it in a new folder named after the video filename, along with all the other files from the initial folder.
Movies/Blue Velvet (1986) - The Criterion Collection/ Blue Velvet - David Lynch (1986).mkv Blue Velvet - David Lynch (1986).srt Blue Velvet - David Lynch (1986).jpg
Movies/Blue Velvet - David Lynch (1986)/ Blue Velvet - David Lynch (1986).mkv Blue Velvet - David Lynch (1986).srt Blue Velvet - David Lynch (1986).jpg Blue Velvet (1986) - The Criterion Collection.txt
Ideally I'd like the process to initiate by selecting folder(s) and fire up a bat. file either by a context menu action or "send to" the bat file, I know how to do both, I just want help with the command in the bat file. That way, using the previous example, I could process only the "Blue Velvet" and other selected movie subfolders and not necessarily everything in the "Movies" root folder in case some don't need sorting but if that's not possible, no problem. Special characters/symbols, numbers and spaces could be included in the folder and file names though. I've searched around and I couldn't find an answer to apply in my situation, I guess the trickiest parts are the subfolder "rename" and a way to perform the action only with selected movie subfolders and not every subfolder in the "Movies" root folder.
Any help would be greatly appreciated, thanks a lot!