Using Python and Unix Shell Scripting
You can accomplish this with some Python scripting and Unix shell code. If you are on a Unix system (macOS or Linux) this won't be a problem. If you are on Windows, you can try Cygwin, but I haven't tried it and the shell script might need some modification.
The first step is to save the following Python script as script.py (or something else) into the same directory as your .blend files:
import bpy import os scene = bpy.context.scene obj = scene.objects.active #Transform and save k = 2 #scale constant bpy.ops.transform.resize(value=(k,k,k)) bpy.ops.object.transform_apply(scale=True) bpy.ops.wm.save_mainfile() #copied from the basic export.py template basedir = os.path.dirname(bpy.data.filepath) if not basedir: raise Exception("Blend file is not saved") name = bpy.path.clean_name(obj.name) fn = os.path.join(basedir, name) bpy.ops.export_scene.fbx(filepath=fn + ".fbx") print("written:", fn)
Note: This script assumes only one object in the blend file, and won't always work if that isn't the case.
Next, in your Unix shell (terminal, command line, etc.) navigate to the directory that your files are in (cd /path/to/directory/).
Finally, run this script in the shell:
for file in *.blend; do /path/to/blender -b "$file" -P script.py; done
If you are on a Mac, and you installed Blender by copying it to the Applications folder, then /path/to/blender will be /Applications/blender.app/Contents/MacOS/blender. If you didn't, or are on Linux, it will be wherever you put Blender.
What the shell script does, is iterate through each of the .blend files in the directory, launch Blender, and then execute the Python script on each file.
Note: The console will not give you any feedback until the entire batch is done, at which time it will spit out all of the console logs at once. While it is running, though, you can check the .fbx files it outputs to make sure that everything is working correctly.