Rank and File
Soldiers of any grade below that of lance-sergeant are so called, collectively, in military phraseology, and any two soldiers of such grade are spoken of as “a file;” thus, 100 rank and file would equal 50 file, that is, 50 men standing behind each other in a row. No soldier ever talks of files in the plural, or about “a file of fours.” As there are two in a “rank,” there is a left file and a right file; and men may move in “single file” or in “double file.” A line of soldiers drawn up side by side or abreast is a rank.
Source: Dictionary of Phrase and Fable, E. Cobham Brewer, 1894
More on Rank and File from Infoplease: