{smcl} {* *! version 1.0.0 30nov2005}{...} {cmd:help fileinfo} {hline} {title:Title} {p2colset 5 16 18 2}{...} {p2col :{hi:fileinfo}}Display and save file information{p_end} {p2colreset}{...} {title:Syntax} {p 8 13 2} {cmd:fileinfo} {it:filespec} [{cmd:,} {opt all}] {title:Description} {pstd} {cmd:fileinfo} works very much like {cmd:dir} and {cmd:ls}. It lists the names of files in the specified directory. {it:filespec} is intended to be a single filename, but it may be any valid Windows, Unix, or Macintosh file path or file specification (see {bind:{bf:[U] 11.6 File-naming conventions}}) and may include "{cmd:*}" to indicate any string of characters. {pstd} The main difference in {cmd:fileinfo} and the {cmd:dir}/{cmd:ls} commands is that it saves its results in the {help return} list. In the event that more than one file matches {it:filespec}, only information on the last file is saved by default. To store information on all files, use the {cmd:all} option. {title:Option} {phang} {opt all} specifies to save information on all files matching {it:filespec}. {title:Example} {cmd:. fileinfo auto.dta} {title:Also see} {psee} Manual: {bf:[D] dir} {psee} Online: {helpb cd}, {helpb copy}, {helpb erase}, {helpb mkdir}, {helpb shell}, {helpb type} {p_end}