commandline icon indicating copy to clipboard operation
commandline copied to clipboard

How to provide file name parameters?

Open BenKalegin opened this issue 8 years ago • 1 comments

class Options { [Option('f', "files")] public IEnumerable Files { get; set; } } Parser.Default.ParseArguments(args, options)

and then started with cmd line -f "C:\Program Files\desktop.ini"

Got and error -f/--files option violates format.

I believe it is pretty regular use case to provide file names.

BenKalegin avatar Mar 17 '17 17:03 BenKalegin

I believe your Files declaration should be:

public IEnumerable FIles { get; set; }

Your example above does not provide a collection object of any kind.

silverfox1948 avatar Apr 29 '17 19:04 silverfox1948