I am building a simple script that I will be adding ffmpeg to after this part works.
@echo off
setlocal disabledelayedexpansion
for /R %%B in (*.mp4,*.mkv) do (
mediainfo.exe "--Inform=Video;%%Format%%" "%%B" > temp.txt
for /f %%G in (temp.txt) do (set tester=%%G)
echo test: %%G
echo video: %tester%
)
pause
The echo's have no data. The file temp.txt has the correct info. So the mediainfo command is working, but the for /f loop is not assigning the data to environment variable tester. I cannot use EnableDelayedExpansion because there could be exclamation marks in the file names. I also tried set /p tester=<temp.txt with the same results.
Here is the output in the command window:
test: %G
video:
Press any key to continue . . .
What am I doing wrong?