I am trying to adapt this batch file(made by adrian from wdtvforum.com) to work on folder/file names with spaces:
FOR /F "delims=*" %%A IN ('dir /b /s *.mkv') DO CALL:WDTVFIX "%%A"
START "" logging.txt
GOTO :eof
:WDTVFIX
mkclean --optimize %~dpnx1 %~dpn1_fixed.mkv
if not errorlevel 0 (
ECHO Failed on %~nx1 remux! >> logging.txt
goto :eof)
ECHO OFF
if exist "%~dpn1_fixed.mkv" (
del "%~dpnx1"
ECHO Processing of %~nx1 successful! >> logging.txt
goto :eof
When using it, it works perfectly with D:\Test\test1.mkv, but does not work on D:\Test\test 1.mkv.
I am not in any way skilled in programming, so I hope someone can help me.
Thanks!
Gearer