I have designed a tool that generates some HTML files and a CSS file in a directory, which then feed into a tool called Jutoh that uses these to make eBooks.However, my output files are of the form 1.htm, 2.htm and so on. Jutoh ranks 10.htm to preceed 2.htm and therefore, I wrote a method to convert 1.htm into 0001.htm. I would like to know your opinion on it and learn where there might be scope for speedup and other improvements.var inputDir = _cssFile.Directory.FullName + \\Output\\;var outputDir = _cssFile.Directory.FullName + \\Output;if (!Directory.Exists(outputDir))    Directory.CreateDirectory(outputDir);DirectoryInfo di = new DirectoryInfo(inputDir);foreach (FileInfo fi in di.GetFiles(*.htm)){    string n = fi.Name.Replace(fi.Extension, ); //remove extension    int k = Int32.Parse(n); //Convert string to int    string t = k.ToString(D4); //convert it into 4 digit    t = t + fi.Extension; // add extension    string trgtfile = Path.Combine(fi.DirectoryName, t);    File.Move(fi.FullName, trgtfile);}
Renaming numbered files for proper sorting
c#;strings;.net