Title
touch -- Create a blank data file
Syntax
touch filename, [type(string)] [replace] [var(string)]
Description
touch creates a blank data file of the type specified. This is useful to avoid append loops failing on the first run due to the file not existing, and is a slightly more elegant solution than -cap append-, as append will still abort the program if there is a real problem. It is similar to the UNIX command touch.
Options
type specifies the type of file to create. Options are txt for text-based file > s e.g. csv, tsv, fixed, etc. or dta for Stata data files. If not specified, > the program will attempt to guess based on the extension given in filename.
var specifies variable(s) to create. Useful for merging in loops.
Version 1.1: Allows specification of the path as part of filename.
Example
. tempfile looptempfile . touch `looptempfile'