Created
June 4, 2020 06:02
-
-
Save malpka/9db3b1a4fb5814d78329141571bfc113 to your computer and use it in GitHub Desktop.
Skipping call arguments, when they are ending with specified string
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@echo off | |
SETLOCAL EnableDelayedExpansion | |
rem SETLOCAL ENABLEEXTENSIONS | |
set args=%1 | |
shift | |
:start | |
if [%1] == [] goto done | |
if [%1] == [-i] ( | |
set test_var=%2 | |
echo %test_var% | |
echo %test_var:~-4% | |
if /i [%test_var:~-4%]==[.gif] ( | |
shift /1 | |
shift /1 | |
) | |
) | |
set args=%args% %1 | |
shift | |
goto start | |
:done | |
echo %args% | |
call ffmpeg %args% |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment