Command Line Arguments: How??
I have the following code. It is just the main part.
How do I use command line arguments to control which section of code is executed??
Code:
public static void Main(string[] args) {
string fromDir;
DateTime startTime = DateTime.Now;
Console.WriteLine("Copy SCO files from CDSWEB to local Tomcat folder");
//Do this with -lib
startInt = 39;
fromDir = "F:\\Jdev9i_conf\\mywork\\SCO\\SCO_Main\\lib";
toDir = "C:\\Java\\Apache\\Tomcat\\webapps\\sco\\WEB-INF\\lib\\";
ProcessDirectory(fromDir);
//Do this with -html
startInt = 47;
fromDir = "F:\\Jdev9i_conf\\mywork\\SCO\\SCO_Main\\public_html";
toDir = "C:\\Java\\Apache\\Tomcat\\webapps\\sco\\";
ProcessDirectory(fromDir);
//Do this with -class
startInt = 43;
fromDir = "F:\\Jdev9i_conf\\mywork\\SCO\\SCO_Main\\classes";
toDir = "C:\\Java\\Apache\\Tomcat\\webapps\\sco\\WEB-INF\\classes\\";
onlyFileType = ".class";
excludeFolder = ".jsps";
ProcessDirectory(fromDir);
}