If you have a FileMaker system and you need to script the processing of adding or removing files on the server, the first problem you are going to come across is: how do I stop the server from a script?
You may already be familiar with the fmsadmin command. This is present on both Mac OS and Windows installs of FileMaker server. You can simply run the following command in Terminal to stop the server:
fmsadmin stop server