Alright, here we go... recall.bat. You always need to provide 1 argument - the executable to call each time. You also need to create an argument file: args.txt by default which should have one argument per line. If the argument has spaces or special characters it should be quote escaped.
Source: recall.bat
@echo off
setLocal EnableDelayedExpansion
::: recall.bat - Call an executable with a series of arguments
::: usage: recall $exec [$argfile]
::: exec - the executable to recall with arguments
::: argfile - the file that contains the arguments, if empty will
::: default to args.txt
::: argfile format:
::: One argument per line, quote-escaped if there's spaces/special chars
if "%~1"=="" findstr "^:::" "%~f0"&GOTO:EOF
set argfile=args.txt
:: Reset argfile if supplied.
if "%~2" neq "" set argfile="%~2"
:: Remove quotes
set argfile=!argfile:"=!
for /f "tokens=*" %%G in (%argfile%) do (
call %1 %%G
)
Example:
args.txt
hello
world
"hello world"
Call:
recall echo args.txt
Output:
hello
world
"hello world"