@if "%EMode%"=="" Set EMode=OFF
@ECHO %EMode%
SetLocal DisableDelayedExpansion
Set "EXTLIST=*.mkv"
Set "DoPop="
if [%1]==[] (
Set "Pattern=%EXTLIST%"
CALL :START %1
)
:ARGS
if [%1]==[] (
EndLocal
pause
goto :eof
)
if NOT EXIST %1 (
SHIFT
goto :ARGS
)
Set "Pattern=%EXTLIST%"
if "%~f1"=="%CD%" (
CALL :START %1
SHIFT
goto :ARGS
)
Type NUL
pushd "%~f1" 2> nul
if NOT "%errorlevel%"=="0" (
if NOT "%CD%\"=="%~dp1" (
pushd "%~dp1"
Set "DoPop=1"
)
Set Pattern="%~nx1"
) else (
Set "DoPop=1"
)
CALL :START %1
if "%DoPop%"=="1" (
popd
Set "DoPop="
)
SHIFT
goto :ARGS
:START
for %%y in (%Pattern%) do (
CALL :Process_File "%%~fy"
)
goto :eof
:Process_File
SetLocal DisableDelayedExpansion
echo Processing; "%~nx1"
Set "Work=%~n1"
if "%Work:~-4,1%"=="_" if "%Work:~-3,1%"=="t" (
Set "Work=%Work:~0,-4%"
)
Set "Work=%Work:_= %"
if NOT "%~n1"=="%Work%" (
echo Renaming "%~nx1" to "%Work%%~x1"
ren "%~f1" "%Work%%~x1"
)
EndLocal
goto :eof
If you haven't already, go to the Tools->General menu, and enable Expert Mode.
That will add some functionality to the selection screen, after you open the disk. Not only will you be able to edit the name embedded in the file, but you can also change the file name written.
And yes, getting rid of the _ replacing spaces would be wonderful. If I were really ambitious, I'd dig through the executable and find where the substitution is done, and change it there, so it would automatically replace spaces with ... spaces!