Skip to main content

Is there any way to convert a file of x format to y format using cmd. I'm able to do it only i when i created fmw file but i wanted to convert it on the fly is that possible?

or is there any way to automate the whole process.

I'm trying to build a web app which is able to view only x format files only so i want to view also some z format files(which my app cannot load),so i want to use fme to convert z format file to x format with a single click is it possible without opening manually(conversion should happen in backend).Please do comment if you didn't get my question or if you have any solution.

Why not just create a workspace (fmw) with a generic reader and generic writer (dynamic scheme), and have the formats as published parameters?


I think the easy convertor workspace that comes as one of the FME Cloud examples would be a solution to your problem.


FME Server (and FME Cloud) is designed for scenarios like this, because you can stream data from there to your web app. So that is one solution. With a notification you could simply drop a format z file into Dropbox (for example) and FME would automatically find it and convert it to format x (either writing it back to a folder or streaming it to an output elsewhere) .

Basically, FME Server = Automation!

If you are FME Desktop only, then all you really need is a workspace that converts format z to format x. Just run it and pick the file to translate.

If you really want to automate it, or make it avoid FME Workbench completely, I've set Windows Explorer before to give files a "Convert with FME" right-click shortcut. So you right click on a file, and it runs a shortcut like fme workspace.fmw --filename=x, ie runs your workspace and passes the name of the file as a published parameter. It doesn't save you much time but it avoids going through the Workbench interface if that's what you want.


FME always requires a workspace (*.fmw) to perform a translation.

Once you have created a workspace (*.fmw) which converts a source dataset with X format to a destination dataset with Z format, you can run it with FME engine from a command line.

The command line looks like this. Assuming that the workspace have two published parameter called "SourceXXX" and "DestZZZ" which receive a source file path and a destination file path.

<FME_HOME>\fme.exe <workspace file path> --SourceXXX <source dataset> --DestZZZ <destination dataset>

FME_HOME: A folder into which you installed FME Desktop. By default, "C:\Program Files\FME".

See also this article: Batch Processing Method 1: Command Line or Batch File


Why not just create a workspace (fmw) with a generic reader and generic writer (dynamic scheme), and have the formats as published parameters?

Is that possible,can you elaborate or can you give any example?

I think the easy convertor workspace that comes as one of the FME Cloud examples would be a solution to your problem.

Can you share any link where i can get the fme cloud examples.

 

 


Is that possible,can you elaborate or can you give any example?
Have a look here:

 

https://knowledge.safe.com/articles/1050/dynamic-workflow-tutorial-introduction.html
Can you share any link where i can get the fme cloud examples.

 

 

You can sign up for FME Cloud here, then start an instance, there's a movie on that page that'll talk you through those steps. You'll find the Easy Convertor in the Samples repository.

 

 


Reply