Sort Utility Command Line

Feb 26, 2009 at 3:22 PM
I changed resxsort in what I feel is a useful way.

I wrote code to make the file2 parameter optional. If file2 is not specified, then ".tsv" is appended to file1.

			for(int i = 0; i < args.Length; i++)
{
if (args[i].Equals("-quiet"))
isQuiet = true;
else if (resx1File == null)
resx1File = args[i];
else if (resx2File == null)
resx2File = args[i];
else
isValid = false;
}

+ // If resx2File was not assigned a vale, use resx1File's name and
+ // append .tsv (Tab Seperated Value). This will result in a file
+ // named something like "form.resx.tsv".
+ if (resx2File == null && resx1File != null)
+ {
+ resx2File = resx1File + ".tsv";
+ }
+
isValid &= (resx1File != null && resx2File != null);