Solved

The Number of Quotation Marks in Command Line on Translation Log


Userlevel 2
Badge +17

Hello,

From this Q&A;: command line fails

Workbench generates a command line when starting the translation and prints it in the Translation Log. It's helpful, but the number of quotation marks surrounding a parameter value seems be too much when the value consists of multiple file paths.

For example, a workspace generated this command line,

"C:\Program Files\FME 2017.1\fme.exe" C:\FME\tmp\textline2none.fmw
      --SourceDataset_TEXTLINE """"""C:\FME\tmp\data_0.txt"" ""C:\FME\tmp\data_1.txt""""""

but I think this is correct, if you run the workspace from the command prompt.

"C:\Program Files\FME 2017.1\fme.exe" C:\FME\tmp\textline2none.fmw
      --SourceDataset_TEXTLINE """""C:\FME\tmp\data_0.txt"" ""C:\FME\tmp\data_1.txt"""""

How do you think about this?

icon

Best answer by trentatsafe 23 June 2017, 21:57

View original

3 replies

Userlevel 4
Badge +13

Hi @takashi The extra quotes do appear to be excessive but does it work? There have been several problem reports about this in past years and I think that all have been resolved. I suspect that fewer quotes won't work in all cases.

Userlevel 2
Badge +17

Hi @takashi The extra quotes do appear to be excessive but does it work?  There have been several problem reports about this in past years and I think that all have been resolved.  I suspect that fewer quotes won't work in all cases.

Hi @DanAtSafe, in my quick test, the command line having extra quotes fails to run the translation. Could you please check the attached demo? command-line-test.zip

 

 

Fail (generated by Workbench, having extra quotes):command-line-test-fail 

"C:\Program Files\FME 2017.0\fme.exe" C:\command-line-test\textline2none.fmw --SourceDataset_TEXTLINE """"""C:\command-line-test\data-1.txt"" ""C:\command-line-test\data-2.txt""""""

 

Success (removed extra quotes):command-line-test-success 

"C:\Program Files\FME 2017.0\fme.exe" C:\command-line-test\textline2none.fmw --SourceDataset_TEXTLINE """""C:\command-line-test\data-1.txt"" ""C:\command-line-test\data-2.txt"""""

 

Badge +6

Hi @takashi,

 

 

The issue here does appear to be related to a known issue. I've created a case from your repro (and attached you to it) and attached it to the PR. I will notify you of any changes. Thank you very much for the repro and the suggested workaround. I was able to mimic your results, and as such your workaround appears to be the best way forward until a fix is implemented! I have commented as such on the public question located here: https://knowledge.safe.com/questions/46102/command-line-fails-1.html notifying them, that your suggestion is the best way forward. Thank you very much.

 

Kind regards.

Reply