Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
Solved

Help with syntax of command line help.

Posted on 2015-02-11
5
74 Views
Last Modified: 2015-02-13
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)")
0
Comment
Question by:HLRosenberger
  • 3
  • 2
5 Comments
 
LVL 11

Expert Comment

by:louisfr
ID: 40605056
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

0
 
LVL 1

Author Comment

by:HLRosenberger
ID: 40607930
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]
0
 
LVL 11

Accepted Solution

by:
louisfr earned 500 total points
ID: 40607974
Then I would write it like this:
Console.WriteLine("LegacyExport /ALL")
Console.WriteLine("LegacyExport /legacy_table=<legacy table name> /SQL_table=<SQL table name> [/DELETE] [/SCHEMAONLY]")
Console.WriteLine("LegacyExport /?")

Open in new window

0
 
LVL 1

Author Comment

by:HLRosenberger
ID: 40607982
ah, got it!  Write each possible invocation on a separate line.

 Thanks much!
0
 
LVL 1

Author Closing Comment

by:HLRosenberger
ID: 40607983
thanks!
0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Since upgrading to Office 2013 or higher installing the Smart Indenter addin will fail. This article will explain how to install it so it will work regardless of the Office version installed.
In this post we will learn how to connect and configure Android Device (Smartphone etc.) with Android Studio. After that we will run a simple Hello World Program.

861 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question