[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: st: combining many data files

From   Kyle Hood <>
Subject   Re: st: combining many data files
Date   Wed, 19 Nov 2008 21:42:23 -0500

there is no way to get append to recognize a wild card. However, you can use the "dir" extended function. Type

help extended_fcn

local x :  dir "c:\mydir" "*.dta"
foreach d of local x {
cap append using appendfilename
save appendfilename, replace

Mingfeng Lin wrote:

I am wondering if there's a straightforward way to append a large
number of .dta files into one file using Stata? The -append- command
seems to disallow wildcards in the file names.  I do find one method
from UCLA's ATS website,

but I'm still hoping there's an easier way, or somehow getting the
-append- command to recognize the wildcards - so that I could just
simply type

append using *.dta

Thanks :)

*   For searches and help try:

Kyle Hood
Department of Economics
Yale University
New Haven, CT

*   For searches and help try:

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