I’m wondering how to create a script/batch executable file via MSDOS or VBS, which would do following.
I have one folder called ‘Movies‘, in this folder are several sub-folders with files like ‘jpg,gif,png,srt,sub,avi,mp4,mkv‘.
What I need is:
0.) Every other file except of ‘jpg,gif,png,srt,sub,avi,mp4,mkv‘ with full or empty directory must be moved to trash or deleted.
1.) Then I need to create under every sub-folder a new folder called ‘Subtitles‘.
2.) Then to rename under every sub-folder ‘jpg,gif,png‘ file to ‘Poster 1‘, ‘Poster 2‘, ‘Poster 3‘ and so on… (no change on extension).
3.) Then I need to move the ‘srt,sub‘ file in to the created ‘Subtitles‘ folder.
4.) Then to rename the ‘srt,sub‘ file and also the folder itself which contains the movie file, according the movie file name. The movie file can have extension: ‘avi,mp4,mkv‘.
5.) This executable file has to be run from the ‘Movies‘ folder and if it’s possible also with results output on the screen (to see what was done).
So basically under folder ‘Movie‘ will be for example folder ‘Pain (2011)‘ which will contain ‘Poster 1.jpg‘, ‘Poster 2.jpg‘, ‘Poster ?.jpg‘ files a sub-folder called ‘Subtitles‘ in which will be the ‘Pain (2011).srt‘ file and at least the name of the folder itself and the subtitle file will be named after the movie file ‘Pain (2011).avi‘. Of course all other files will be moved to trash or removed.
Every idea is much appreciated!
Thank you!
Sue
OUTPUT:
Press any key to continue . . .
File “monsieur_lazhar_.jpg” renamed to “Poster 1.jpg”
File “monsieur_lazhar__ver2.jpg” renamed to “Poster 2.jpg”
File “Poster 1.jpg” renamed to “Poster 3.jpg”
Press any key to continue . . .
/// in the folder are only 2 jpg files, and one of them is renamed twice
1 Answer