Stata 15 help for dir

[D] dir -- Display filenames

Syntax

{dir|ls} ["][filespec]["] [, wide]

filespec is any valid Mac, Unix, or Windows file path or file specification (see [U] 11.6 Filenaming conventions) and may include "*" to indicate any string of characters.

Note: Double quotes must be used to enclose filespec if the name contains spaces.

Description

dir and ls -- they work the same way -- list the names of files in the specified directory; the names of the commands come from names popular on Unix and Windows computers.

Option

wide under Mac and Windows produces an effect similar to specifying /W with the DOS dir command -- it compresses the resulting listing by placing more than one filename on a line. Under Unix, it produces the same effect as typing ls -F -C. Without the wide option, ls is equivalent to ls -F -l.

Examples

Windows: . dir . dir, w . dir *.dta . dir \mydata\*.dta

Mac and Unix: . ls . ls, w . ls *.dta . ls ~/mydata/*.dta


© Copyright 1996–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index