Me either.
It seems that you want to send all the audio files in 1 folder (probably an album) to Foobar and then to Mp3tag.
If that is the case then I suggest modifying the batch file by replacing the Foobar command with this (all on 1 line) : "%PROGRAMFILES(x86)%\foobar2000\foobar2000.exe" /command:clear /exit && "%PROGRAMFILES(x86)%\foobar2000\foobar2000.exe" /add %1
and selecting the album folder, not individual files.
It will clear the Foobar playlist and then add the audio files contained in the folder.
You can then use the Foobar context menu to apply replay gain.
When you close Foobar, Mp3tag will open with all the same files in the selected folder.
N.B If Foobar is open when this batch file is used, its playlist will not be cleared. I can't figure out why.
I only use foobar occasionally and haven't updated in a while. I haven't dealt with the Foobar command line yet.
My tests were done with version 1.3.17:
Foobar started. Replaygain was started and the confirmation catalog for the update of the Replaygain values for the files of the transferred folder came up.
After finishing Foobar, MP3Tag started with the files and existing Replaygain tags.
I have now updated Foobar to version 1.6.8. The batch file no longer works here. Foobar starts without the transferried files of the folder.
These changes make the script work again with version 1.6.8 to the extent that the files contained in the folder are transferred to Foobar. The automatic replay gain process, which worked in my older version, no longer works, as written by @ryerman.
I think this is a problem that should rather be dealt with in the Foobar forum, which the thread creator already did 2 days ago, albeit without an answer so far.
I did a short crash course.
The reason why the script does not work with newer versions of Foobar is simply due to a changed context menu parameter for replay gain.
The parameter used to be called "Scan selection as albums (by tags)", today it is only called "Scan as albums (by tags)".
I also changed %1 to "%~1".
Here is the complete modified script:
@echo off
Echo Sending selected files to Foobar2000 to apply Album-level ReplayGain...
"%PROGRAMFILES(x86)%\foobar2000\foobar2000.exe" /context_command:"Replaygain/Scan as albums (by tags)" %*
if not %ERRORLEVEL%==0 goto :errorfoobar
Echo Sending direcotry to MP3Tag so you can apply the actions...
"%PROGRAMFILES(x86)%\Mp3tag\mp3tag.exe" /fp:"%~1"
if not %ERRORLEVEL%==0 goto :errormp3tag
exit
:errorfoobar
echo Foobar2000 exited abnormally, ending script
pause
exit
:errormp3tag
echo MP3Tag exited abnormally, ending script
pause
exit
@GMahal
You should be aware that this script is for album_replaygain. So Foobar only calculates correct scripts if the album-tag is filled already.