Skip to main content
Solved

Suggested Command-line to run a workspace doesn not work

  • November 16, 2018
  • 6 replies
  • 51 views

Forum|alt.badge.img

I have a workspace that has a published parameter of type Filename (Multiple)

 

and I have multiple files in a folder with spaces.

 

At the top of my fmw file is says that this should be the command-line to run the workspace

 

"C:\\Program Files\\FME\\fme.exe" "ImporteerTrimble.fmw"

 

--DB_Service "ODSDEV"

 

--DB_User "GVR"

 

--DB_Password "********"

 

--Project_ID "22"--SchemaName "INWINNING"

 

--Bronbestand """D:\\Path with space\\file1.dxf" "D:\\Path with space\\file2.dxf"""

But when I run this command line it complains that there are uneven number of command line arguments.

I just can't get this to work from the command line, running within FME Workbench does work.

 

When I remove some quotes it accepts the arguments but then the reader fails

 

AutoCAD Reader: Unrecognized extension for source file 'D:\\Path'.

Best answer by takashi

The command line shown on the log could be wrong. It's a known issue. Try changing the file paths parameter to this one.

--Bronbestand """""D:\Path with space\file1.dxf"" ""D:\Path with space\file2.dxf"""""
View original
Did this help you find an answer to your question?

6 replies

erik_jan
Contributor
Forum|alt.badge.img+18
  • Contributor
  • November 16, 2018

The issue is that the command line needs to be 1 line.

You can use the ^ sign to continue the line like this:

"C:\\Program Files\\FME\\fme.exe" "ImporteerTrimble.fmw" ^

 

--DB_Service "ODSDEV" ^

 

--DB_User "GVR" ^

 

--DB_Password "********" ^

 

--Project_ID "22"--SchemaName "INWINNING" ^

 

--Bronbestand """D:\\Path with space\\file1.dxf" "D:\\Path with space\\file2.dxf"""

 

Hope this helps.


Forum|alt.badge.img
  • Author
  • November 16, 2018

Hi Erik jan, I just posted it as its shown in the workspace but I have it all on one line and tried way to many combinations and even with a parameter file, I just can't get it to work. Either there are uneven parameters or the reader sees only the first part of the path.


erik_jan
Contributor
Forum|alt.badge.img+18
  • Contributor
  • November 16, 2018
erik_jan wrote:

The issue is that the command line needs to be 1 line.

You can use the ^ sign to continue the line like this:

"C:\\Program Files\\FME\\fme.exe" "ImporteerTrimble.fmw" ^

 

--DB_Service "ODSDEV" ^

 

--DB_User "GVR" ^

 

--DB_Password "********" ^

 

--Project_ID "22"--SchemaName "INWINNING" ^

 

--Bronbestand """D:\\Path with space\\file1.dxf" "D:\\Path with space\\file2.dxf"""

 

Hope this helps.

Hi Valentijn,

I can see potential issues:

The "22" and --SchemaName seem to be connected (not separated by a space).

The quotes around the value for Bronbestand (not sure about the number of quotes).

I suggest trying the --SchemaName on the next line and changing the quotation for Bronbestand.


takashi
Influencer
  • Best Answer
  • November 18, 2018

The command line shown on the log could be wrong. It's a known issue. Try changing the file paths parameter to this one.

--Bronbestand """""D:\Path with space\file1.dxf"" ""D:\Path with space\file2.dxf"""""

Forum|alt.badge.img
  • Author
  • November 18, 2018
takashi wrote:

The command line shown on the log could be wrong. It's a known issue. Try changing the file paths parameter to this one.

--Bronbestand """""D:\Path with space\file1.dxf"" ""D:\Path with space\file2.dxf"""""

So the format is three quotes around the whole and two quotes around each filename and separating the files with a space. That works thanks takashi.

I think I kept balancing the number of quotes around the whole with the ones around the filenames but the whole is an uneven number of quotes and the filename are even quotes.


takashi
Influencer
  • November 18, 2018
takashi wrote:

The command line shown on the log could be wrong. It's a known issue. Try changing the file paths parameter to this one.

--Bronbestand """""D:\Path with space\file1.dxf"" ""D:\Path with space\file2.dxf"""""

In my understanding, the rules are:

  1. Quote each path by a pair of double quotations and concatenate them separating by spaces. "<path1>" "<path2>"
  2. Then, surround the entire string by a pair of double quotations. ""<path1>" "<path2>""
  3. Further, in a command line, a parameter value should be quoted by a pair of double quotations, if the value contains a space. """<path1>" "<path2>"""
  4. Finally, every double quotation except the outer-most ones should be escaped by inserting a double quotation mark in front of each of them. """""<path1>"" ""<path2>"""""

I hope the translation log displays a correct command line always.

 


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