-1

I'm currently running the following command and it's giving me mostly what I need, but I would like to also have it include the file name.

for %%A IN (%VAR0%\*.wav) DO "C:\program files (x86)\ffmpeg\bin\ffprobe" -i "%%A" -show_entries format=duration -v quiet -of csv="p=0" >>output.txt

The above produces this:

110.994375

This is great, but what I would really want is something like this as I need to import this data into a db for further processing. I need to know which file the 110.9943765 came from.

recording1.wav, 110.994375

Thanks,

Steven

halfelf
  • 9,737
  • 13
  • 54
  • 63
  • tie the numeric val in stdout to the input to ffprobe by doing the io INSIDE the loop to 'out%%A' . Then do another loop which cats the fileName with the file's content .... outRecrd1.wav , 110.994375 is on a line by itself http://stackoverflow.com/questions/9011233/for-files-in-directory-only-echo-filename-no-path – Robert Rowntree Dec 26 '16 at 21:44

1 Answers1

1

All you need is to add the filename key as well.

ffprobe -i "%%A" -show_entries format=filename,duration -v quiet -of csv="p=0" >>output.txt
Gyan
  • 85,394
  • 9
  • 169
  • 201