This is my action to calculate the average bitrate for non-flac albums and store that as for example [MP3 255] at the end of the album tag.
When I use variables in the path for this export action:
$loop(%_filename_ext%)
$puts(Vbitrate,$add($get(Vbitrate),$mul(%_bitrate%,%_length_seconds%)))
$puts(cnt1,$add($get(cnt1),%_length_seconds%))
$loopend()
$div($get(Vbitrate),$get(cnt1))
I get "could not access file" errors on execution.
However, if I use an absolute path like "D:\rips\average bitrate.txt" I get errors the first time but once the text file is created, consecutive runs work.. kind of.
They lag 1 execution behind and store the value of the previous run in the tag.
Example:
I use it on an album with 320kBit/s mp3s -> 320 gets stored in the .txt
I use it on an album with ~255kBit/s mp3s -> 255 gets stored in the .txt file but 320 ends up in %custom1% and the album tag.
When I then rerun the action on the same ~255kBit/s mp3s folder it receives the correct value.
I'm not sure if that's the case, but could the action run too quickly and try to access the text file before it was finished being written to? In that case adding a delay between actions (even as little as a second) within an action group could resolve my problem (if that is possible).
That should also enable me to use "D:\rips%albumartist% - %album%.txt" in theory, meaning I could run my action over multiple folders without errors, which I would like.
So far I use it twice on each folder and that works well enough but I'd like to improve it.