On 8/22/06, Radu Ban <[email protected]> wrote:
....I'm looking for a way to loop this do-file over all the files in
the folder.
Try this (after changing the folder path to suit your setup):
local files : dir "C:\Documents and Settings\Dimitriy V.
Masterov\Desktop" files "*.txt";
cd "C:\Documents and Settings\Dimitriy V. Masterov\Desktop";
foreach file in `files' {;
insheet using `file', comma clear;
/* do your stuff here */
};
HTH,
DVM
*
* For searches and help try:
* http://www.stata.com/support/faqs/res/findit.html
* http://www.stata.com/support/statalist/faq
* http://www.ats.ucla.edu/stat/stata/