There is a direct way of calling FMW file and passing the arguments accordingly. See below the complete details.
FME can be run from the command line in Windows: Opening the Command Prompt window and typing FME gives the full list of options displayed below.
The command FME .fmw will run a particular workspace. Therefore, if FME workspaces can be called from the command line, a series of workspaces (or the same workspace with differing datasets) can be called from a DOS batch (.bat) file.
Usage
fme <controlFile> [<keyword> <value>]* [--<macroName> <value>]*
fme <scriptfile> [<scriptArgument>*]
fme <licenseFile>.fmelic
fme <command> <arguments>
where:
<controlFile> is one of <mappingFile>.fme or <workspace>.fmw
<scriptFile> is one of <tclScript>.tcl or <pythonScript>.py
<command> is one of:
Command Name Arguments
GENERATE <sourceType> <destType> <sourceDataset> <controlFile> [<keyword> <value>]*
PARAMETER_FILE <parameterFile>
COMMAND_FILE <commandFile>
REGISTER_SOCKET <hostName> <service> [serverConfigFile] [-<ServerParmName> <ServerParmValue>]*
CREATE_SOCKET <service> [serverConfigFile] [-<ServerParmName> <ServerParmValue>]*
GENTRANS [<keyword> <value>]* <parameterFile>
GENTRANS [<keyword> <value>]* <sourceType> <sourceDataset> <destType> <destDataset>
LIST_TRANSFORMERS [VERBOSE]
LIST_UNLICENSED_TRANSFORMERS
LIST_FACTORIES
LIST_FUNCTIONS
PROTECT <sourceFile> <destFile>
Reference Link Batch Processing Method