Use the “Trim Extend” Nyquist Plug-in https://forum.audacityteam.org/t/trimtrack-plug-in/14323/7 .
To install the plug-in, see here http://wiki.audacityteam.org/wiki/Download_Nyquist_Plug-ins#install .
Then add the Trim Extend plug-in to a “Chain” and apply it to the files. See here for help:
http://manual.audacityteam.org/o/man/batch_processing.html .
Gale