Solved

Help with syntax of command line help.

Posted on 2015-02-11
5
64 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

What Should I Do With This Threat Intelligence?

Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

Join & Write a Comment

This article will show, step by step, how to integrate R code into a R Sweave document
This is an explanation of a simple data model to help parse a JSON feed
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 …
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…

706 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

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now