Skip to content

Instantly share code, notes, and snippets.

@malpka
Created June 4, 2020 06:02
Show Gist options
  • Save malpka/9db3b1a4fb5814d78329141571bfc113 to your computer and use it in GitHub Desktop.
Save malpka/9db3b1a4fb5814d78329141571bfc113 to your computer and use it in GitHub Desktop.
Skipping call arguments, when they are ending with specified string
@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