have you tried using "export field contents" to a temporary file path, then executing the batch file from there?
I've only ever run batch files via send event from a static locally stored location, IE a SAN/NAS location or as a server scheduled script.
Get(TemporaryPath) will give you a decent hard to find location if you're worried about users seeing the code.
You could also (theoretically) pair another send event function to delete the local temp file after runtime.
Please be aware that Export Field Contents writes utf-16 text files which may not let run on your system as expected.
in a lot of cases you do not need the batch file. One long command line execution can do the same thing. So your send event would look like this:
cmd /c command1 && command2 && command3 && command4... and so on
The best solution would be to do a regular export a field from a table containing a record for each script line.
Check out FMDiff to compare two FileMaker files and test for
file corruption at <http://www.fmdiff.com>
And this solves the requirement of hiding any code files from your clients as well. Thanks Wim.