Statalist


[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

Re: st: Appending files using stat transfer


From   "Sergiy Radyakin" <[email protected]>
To   [email protected]
Subject   Re: st: Appending files using stat transfer
Date   Tue, 19 Feb 2008 16:53:02 -0500

well it calls fs, and there is such a package:

fs from http://fmwww.bc.edu/RePEc/bocode/f
    'FS': module to show names of files in compact form / fs lists the names
    of files in compact form. With no arguments, / fs lists names of files in
    the current directory or folder.  / Otherwise, it follows file
    specifications. A file / specification is a filename or (more commonly) a

Try it, and see if it works.

Best regards,
   Sergiy



On 2/19/08, Raphael Fraser <[email protected]> wrote:
> I would like to append several files. I came accross the e-mail below
> in the Statalist archive. I can not located the -ps- package
> mentioned. Can any one help?
>
> Raphael
> **************************************************************
> From      "Nuno Soares" <[email protected]>
> To        <[email protected]>
> Subject           RE: st: Appending files using stat transfer
> Date      Fri, 29 Dec 2006 10:11:22 -0000
> A few days ago a posted a reply on this subject, but it didn't appear on the
> list. Here it goes again.
> A possible solution would be doing something like:
>
> After converting the excel files to dta using StatTransfer you can run this
> code:
>
> clear
> cd "c:\folder_with_dta_files"
> fs *.dta
> local j "0"
> foreach f in `r(files)' {
>        if `j' == 0 use `f'
>        else append using `f'
>        local ++j
> }
> save mydata.dta,replace
>
> It needs to have the -ps- package installed.
> Best,
>
> Nuno
> *
> *   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/
>
*
*   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/



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