Statalist


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

st: AW: AW: Acessing files in dir


From   "Martin Weiss" <martin.weiss1@gmx.de>
To   <statalist@hsphsun2.harvard.edu>
Subject   st: AW: AW: Acessing files in dir
Date   Mon, 13 Jul 2009 13:47:31 +0200

<> 


*************
ssc inst dirlist

dirlist *.dta

foreach file in `r(fnames)'{
	u `file'
	//insert whatever you have in mind here
	d, s
}

*************



HTH
Martin


-----Ursprüngliche Nachricht-----
Von: owner-statalist@hsphsun2.harvard.edu
[mailto:owner-statalist@hsphsun2.harvard.edu] Im Auftrag von Martin Weiss
Gesendet: Montag, 13. Juli 2009 13:43
An: statalist@hsphsun2.harvard.edu
Betreff: st: AW: Acessing files in dir


<> 



*************
ssc d dirlist
*************



HTH
Martin

-----Ursprüngliche Nachricht-----
Von: owner-statalist@hsphsun2.harvard.edu
[mailto:owner-statalist@hsphsun2.harvard.edu] Im Auftrag von Tiago Dias
Gesendet: Montag, 13. Juli 2009 13:37
An: statalist@hsphsun2.harvard.edu
Betreff: st: Acessing files in dir

Hi, everybody. This is my first question to Statalist, so please excuse me
if I commit a mistake.
 
I have a directory with a few hundreds files, all in .dta. I need to -use-
each one of them and make the same modification. If I modify one by one, I
have a big chance of missing one of them or modifying twice a single file.
I thought about using -dir- to get the filelist and -foreach- to have stata
browsing, using, modifying and saving each file on filepath, but I don't
know how to access the filenames in -dir-.
Anyone has a idea?
 
I'm using Stata 10.1 in Windows Vista.


 
____________________________________________________________________________
________
Veja quais são os assuntos do momento no Yahoo! +Buscados
http://br.maisbuscados.yahoo.com

*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/


*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/


*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/



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