Hi,
I would like to create an FME workspace that triggers a .bat file to run. I am not familiar with Python so if there is any simple way this can be done with transformers that would be great.
Thanks for your help.
Hi,
I would like to create an FME workspace that triggers a .bat file to run. I am not familiar with Python so if there is any simple way this can be done with transformers that would be great.
Thanks for your help.
SystemCaller Transformer could help.
The SystemCaller transformer can do this.
Hi @aquamarine,
As both mark_1spatial and erik_jan already mentioned, the SystemCaller is the transformer that will solve this problem for you. Just a little example to help you.
I created a simple bat-script that does create an empty file in the same folder as the bat-file is in. This bat-file is located in C:\temp\FME\. The code in this bat-file is the following:
echo. 2>EmptyFile.txt
Running this bat-file results indeed in the creation of the file 'EmptyFile.txt'.
Now that we know the bat-file is working, it is time to call it from the Workbench. I create a simple Workspace containing only a creator and a SystemCaller and the Workspace is saved in the same folder as the bat-file is. When running the workspace, the 'EmptyFile.txt' is created as expected.
Watch out. Since now the Bat-file is called from the workspace; the file will be created in the same folder the workspace is in. This doesn't have to be the folder the bat-file is in.
Does this answer solve your question?
Thanks yes I tried the SystemCaller and that worked. Thanks for all your help :)