setlocal enabledelayedexpansion
for %%b in (*.wav) do (
set duration=0
for /f "tokens=3,5" %%a in ('ffprobe -i "%%b" -show_entries format^=duration -v quiet -of csv^=p^=0') do (
echo 'asdf' >> test.txt
)
)
For some reason the above code isn't running properly. When I remove the "/f" part it works, but with the "/f" part it isn't setting the duration variable, I tried doing an "echo 'asdf' >> test.txt" inside of that loop as well and it doesn't work either, nothing I put into the "do" clause for the loop with /f is working.
Any ideas? I tried removing the "for %%b in (*.wav) do (" loop and didn't make a difference either.
Here's the output of ffprobe if I just run it by itself.
C:\Users\deama\Desktop\Empire\voiceacting_samples\gothic2\xardas>ffprobe -i OUTR
O_XARDAS_14_10.WAV -show_entries format=duration -v quiet -of csv=p=0
4.129546
C:\Users\deama\Desktop\Empire\voiceacting_samples\gothic2\xardas>
The script with the for loop is located in the same directory called "pop.bat".