Skip to main content
Question

Trigger a .bat file using FME


Forum|alt.badge.img+1

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.

4 replies

Forum|alt.badge.img+2
  • April 20, 2016

SystemCaller Transformer could help.


erik_jan
Contributor
Forum|alt.badge.img+17
  • Contributor
  • April 20, 2016

The SystemCaller transformer can do this.


Forum|alt.badge.img+7

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:

echo2>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?

0684Q00000ArL7RQAV.jpg


Forum|alt.badge.img+1
  • Author
  • April 25, 2016

Thanks yes I tried the SystemCaller and that worked. Thanks for all your help :)


Reply


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings