View Single Post
Old 18th February 2013, 10:46   #16  |  Link
LanguidLegend
Registered User
 
Join Date: Jan 2013
Posts: 10
Hey sneaker, got another quick followup question for ya.
So here's my code:
Code:
@echo off
setlocal enabledelayedexpansion
SET /P folder=Source folder:

CD /D %folder%

FOR /R %%I IN (*.avi) DO (
	ECHO %%~fI
	IF EXIST "%%~fI" ( :if an avi file exists, convert it
		echo "%%~I" exists
		mkvmerge -o "%%~dI%%~pI%%~nI.mkv" "%%I"
		IF EXIST "%%~nI.mkv" ( :if mkv conversion successful, then delete source file
			RECYCLE "%%~fI"
			ECHO "%%~I DELETED" )
	)
)

FOR /R %%I IN (*.mp4) DO (
	ECHO %%~fI
	IF EXIST "%%~fI" ( :if an mp4 file exists, convert it
		echo "%%~I" exists
		mkvmerge -o "%%~dI%%~pI%%~nI.mkv" "%%I"
		IF EXIST "%%~nI.mkv" ( :if mkv conversion successful, then delete source file
			RECYCLE "%%~fI"
			ECHO "%%~I DELETED" )
	)
)
pause

FOR /R %%I IN (*.mkv) DO (mkvpropedit "%%~I" --edit track:v1 --set display-width=16 --set display-height=9 --set display-unit=3)
It is going through folders I know have avi & mp4 files in them but the IF EXIST conditional keeps failing for some reason..

Last edited by LanguidLegend; 18th February 2013 at 10:48.
LanguidLegend is offline   Reply With Quote