|Sorry if this was already answered but wasnt entirely sure how to word what I am looking for as I am an extreme newb in batch scripting.|
Anyway using a for loop i assigned values to different varialbes if a certain string was found
my input looks like so:
Track ID 1: video (V_MPEG4/ISO/AVC)
Track ID 2: audio (A_AC3)
Track ID 3: subtitles (S_VOBSUB)
Track ID 4: subtitles (S_VOBSUB)
Track ID 5: audio (A_AC3)
for /f (usebackq tokens=3,5) %%a in (`mkvmerge -i filename ^| grep audio ^| sed "s/\(.*\):/\1/"`) do (
if "%%c"=="(A_AC3)" (
set /a count+=1
call SetVar.bat %a REM this is an external .bat
so anyway the assigning is going perfectly well. Everytime it iterates it creates a new variable to save into.
with the input above i get
my problem is I have no idea how to access those values other than writing out the whole file name, %myvar1%, which wont work in a loop.
I have tried
and a few others but i have no idea what I am doing. Any help woulld be appreciated.