1

I have a file named "test PID 1100 DELAY 322ms.aac" which i am getting using the following code :-

for %%i in (test*.aac) do SET "AACFILE=%%~ni"
D:\Converter\bin\faad.exe -o C:\fb\%1.wav "C:\fb\%AACFILE%.aac"

After this i need to read the numeric value between DELAY and .aac from the file and echo it in the following line at the end.

D:\Converter\bin\EAC3to.exe C:\fb\%1.wav C:\fb\%1-Synced.wav +322ms

Also i need to add 100 to the echoed value, For example if the value in file is 322ms then i want to output 422ms.

4

1 回答 1

1

尝试这个:

@echo off
setlocal enabledelayedexpansion

for /f "tokens=5 delims=. " %%a in (%AACFILE%) do (
  set num=%%a & set num=!num:ms=! & set /a num=!num!+100
  D:\Converter\bin\EAC3to.exe C:\fb\%1.wav C:\fb\%1-Synced.wav +!num!ms
)
于 2013-11-12T18:01:03.027 回答