Needle files come in various lengths.
There are two main differences between needle and escapement files. Escapement files are more finely cut than needle files. That is, a #6 escapement file has more teeth per inch than a #6 needle file. Also the belly, i.e., the cutting area, of a needle file is about the same length as the handle, whereas the belly of an escapement file is about 1/3 to 1/2 as long as the handle.
Escapement files also have handles that are square in section whereas needle files have round handles. Though this doesn’t really alter their function it is useful for telling them apart at the bench.