I have a little windows batch script that does nothing but prints all its command line arguments (proba.bat)
@echo off
:loop
if "%~1"=="" goto cont
echo %1
shift & goto loop
:cont
I expected that this script would print all .mp4 files if I call it like this:
proba *.mp4
But instead it simply prints *.mp4 literally. This would be so easy on linux, but here I can not get it work. What am I doing wrong?
Thank you
dir %1
rather thanecho %1
, use/b
to get a bare list if that's what you're after. Otherwise, look at thefor
command.*.mp4
, not a list of files.