Link to home
Start Free TrialLog in
Avatar of HLRosenberger
HLRosenbergerFlag for United States of America

asked on

Help with syntax of command line help.

I need help with the correct syntax of command line help.

For this exe, either /ALL can be specified, or /legacy_table and /SQL_table=SQL.  if the later, the /DELETE and /SCHEMAONLY are optional.  I know what I have below is not quite correct.   Thanks.


Console.WriteLine("LegacyExport [/ALL] [/DELETE] [/SCHEMAONLY]")
Console.WriteLine("         </legacy_table=legacy table name> ")
Console.WriteLine("         </SQL_table=SQL table name> ")
Console.WriteLine("         [/?] (prints this help message)")
Avatar of louisfr
louisfr

I understand you can have two sets of parameters:
1) /ALL, with optional /DELETE and /SCHEMAONLY
2) /legacy_table and /SQL_table
Then I would write it like this:
Console.WriteLine("LegacyExport /ALL [/DELETE] [/SCHEMAONLY]")
Console.WriteLine("LegacyExport /legacy_table=<legacy table name> /SQL_table=<SQL table name>")
Console.WriteLine("LegacyExport /?")

Open in new window

Avatar of HLRosenberger

ASKER

Not quite...  /ALL is an arg all by itself.   if /ALL is specified, not other args are required.

if all is not specified, then /legacy_table and /SQL_table must be specified, and optionally /DELETE] and/or [/SCHEMAONLY]
ASKER CERTIFIED SOLUTION
Avatar of louisfr
louisfr

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
ah, got it!  Write each possible invocation on a separate line.

 Thanks much!
thanks!