When I use the duration tag for id3 files I get the result 0:00:00 (approx). Is there anyway I can remove the (approx) part? there is a space before (approx) that I need to remove too.
Thank you for any help recieved.
Greg
Hi Greg,
There are various ways to do this. Since I don't know what you are doing with this value, I will list a some of the techniques:
1) Use -n or -duration# to get the duration in seconds.
2) If using $duration in an expression, use ${duration;s/ \(.*//} instead.
3) Use the API Filter option to remove " (approx)" from all tag values: -api filter="s/ \(approx\)//"
4) Create a custom user-defined tag to format Duration any way you want.
- Phil
Hi phil thank you for the quick reply. Sorry total newbie here. I have a batchfile that copies metadata from mp3s to seperate divs in a html file. Here's my batch:
exiftool.exe -LameStereoMode -AudioBitrate -FileName -Directory -Year -
Genre -Album -Band -Length -Duration -Directory-Filename -j -r -ext mp3
-ext flac "C:\Audio" |find /v "ExifToolVersion" >
I'm not sure which one of your examples fits or even where it goes.
OK. The Filter option is probably easiest. Just add the option I mentioned in technique 3 to your command. Anywhere is fine, except between -ext and its argument.
- Phil
Thank you very much Phil. That works great!!!