?
Solved

Help with syntax of command line help.

Posted on 2015-02-11
5
Medium Priority
?
84 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
[X]
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
  • 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 2000 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

On Demand Webinar: Networking for the Cloud Era

Did you know SD-WANs can improve network connectivity? Check out this webinar to learn how an SD-WAN simplified, one-click tool can help you migrate and manage data in the cloud.

Question has a verified solution.

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

In this post we will learn different types of Android Layout and some basics of an Android App.
Today, the web development industry is booming, and many people consider it to be their vocation. The question you may be asking yourself is – how do I become a web developer?
Viewers will learn how to properly install Eclipse with the necessary JDK, and will take a look at an introductory Java program. Download Eclipse installation zip file: Extract files from zip file: Download and install JDK 8: Open Eclipse and …
Starting up a Project

741 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