I have this part of batch script which is doing following:
-There is a main folder, in the main folder are two files (movie & subtitle file) and one Sub-fo
@echo off
setlocal EnableDelayedExpansion
cd /D "%~DP0"
echo BASE FOLDER: %cd%
set n=0
for /D %%a in (*) do (
set /A n+=1
cd "%%a"
echo ==================================================================
echo Processing folder: %%a
set movieName=%%~a
for %%b in (*.avi *.mp4 *.mkv) do (
ren "%%~b" "!movieName!%%~Xb"
echo Movie file "%%b" renamed to "!movieName!%%~Xb"
)
for %%b in (*.srt *.sub) do (
move "%%~b" "Subtitles\!movieName!%%~Xb"
echo File "%%b" moved and renamed to "Subtitles\!movieName!%%~Xb"
)
cd ..
)
echo ==================================================================
echo %n% FOLDERS PROCESSED
pause