Skip to content

Commit beb1083

Browse files
committed
Added --ffmpegloc flag
1 parent f207791 commit beb1083

1 file changed

Lines changed: 14 additions & 7 deletions

File tree

batch encoder.bat

Lines changed: 14 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -60,8 +60,8 @@ pause rem remove
6060
call:ClearAndTitle
6161
if /i %par_silent%==true (
6262
if not defined par_update (echo Error: --silent switch used but --update [true/false] not provided. & exit /b 1)
63-
if /i %par_update%==false (goto FFMPEGLocation)
64-
if /i %par_update%==true (goto AutoUpdate)
63+
if /i "%par_update:"=%"=="false" (goto FFMPEGLocation)
64+
if /i "%par_update:"=%"=="true" (goto AutoUpdate)
6565
echo Error: --update argument invalid ^(should be [true/false]^). & exit /b 1
6666
)
6767
set /p "updateconfirmation=%icongray% ^ %formatend% Would you like to check for an update? %textgray%[Y/N]%formatend%: "
@@ -113,17 +113,24 @@ pause rem remove
113113

114114
:FFMPEGLocation
115115
call:ClearAndTitle
116-
rem TODO: detect FFMPEG if in same folder
116+
if /i %par_silent%==true (
117+
if not defined par_ffmpegloc (echo Error: --silent switch used but --ffmpegloc [path] not provided. & exit /b 1)
118+
if not exist "%par_ffmpegloc:"=%" (
119+
echo "Error: --ffmpegloc path provided does not exist." & exit /b 1
120+
) else (
121+
set "LOCATION=%par_ffmpegloc:"=%"
122+
goto Count
123+
)
124+
)
117125
set /p "LOCATION=%icongray% ? %formatend% Where is FFMPEG.exe located? (paste full path): "
118-
119-
set /a "COUNTER=-1"
120126

121127
:Count
128+
set /a "COUNTER=-1"
122129
for %%f in (.\*) do set /a "COUNTER+=1"
123130
set "TOTAL=%COUNTER%"
124131

125-
set /a "COUNTER=0"
126-
set "INPUTFILE="
132+
set /a "COUNTER=0"
133+
set "INPUTFILE="
127134

128135
:Conversion
129136
for %%f in (.\*) do (

0 commit comments

Comments
 (0)