I want to accomplish something like this:
-LoadFiles
-SourceFile "" -DestPath ""
-SourceFolder "" -DestPath ""
-GenericOperation
-SpecificOperation -Arga "" -Argb ""
-OtherOperation -Argc "" -Argb "" -Argc ""
A user should be able to run things like:
-LoadFiles -SourceFile "somePath" -DestPath "somePath"
or
-LoadFiles -SourceFolder "somePath" -DestPath "somePath"
Basically, if you have -LoadFiles
, you are required to have either -SourceFile
or -SourceFolder
after. If you have -SourceFile
, you are required to have -DestPath
, etc.
Is this chain of required arguments for other arguments possible? If not, can I at least do something like, if you have -SourceFile
, you MUST have -DestPath
?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…