That's not a good idea: there are quite a few problems with your code here.
Trivial stuff:
string filepath = args[i];
No, it doesn't. And a wrong comment is much, much worse than no comment.
The main problem is that you aren't considering what happens if the user makes a mistake: what if he types parameters in the wrong order.
While it's ok to use -f and -o, the normal default is
exename infile {outfile} {parameters}
Where parameters are marked by starting with either a '-' or a '/'.
The way I handle it is to preset:
string inpath = LoadLastInputFile();
string outpath = inpath;
bool firstFile = true;
foreach (string arg in args)
{
if (arg.StartsWith('/') || arg.StartsWith('-'))
{
HandleOption(arg);
}
else
{
if (firstFile)
{
if (!File.Exists(arg))
{
Console.WriteLine("Input file not found: {0}", arg);
return;
}
inpath = arg;
outpath = inpath;
firstFile = false;
}
else
{
outpath = arg;
}
}
}