I have one text file (trimlist.txt) with a variable number of lines, but each line are similar with a variable file path and name and 2 numbers separated by coma:
E:\test\00037_20161001_100956.mov,3.6369666,1.2345666
I need to get 3 different variables from each line: mov, 3.6369666 & 1.2345666 in this example. I can get the 2 last variables like this
set prevfile=
for /F "tokens=1,2,3 delims=," %%F in (E:\trimlist.txt) do (
if "%%F"=="!prevfile!" (
if "!counter!"=="" (set counter=1) else (set /a counter+=1)
) else (
set counter=
set "prevfile=%%F"
)
ffmpeg -ss "%%G" -i "%%F" -c copy -t "%%H" "%%~dpnF!counter!-trimmed.mov"
So with the above text file my final commmand will be
ffmpeg -ss 3.6369666 -i "E:\test\00037_20161001_100956.mov" -c copy -t 1.2345666 "E:\test\00037_20161001_100956 01 -trimmed.mov"
I would like the "mov"
of E:\test\00037_20161001_100956 01 -trimmed.mov
to be a variable taken from the textfile.
Any help will be greatly appreciated.