Stata The Stata listserver
[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

st: RE: RE: RE: reading the first X letters of a filename


From   "Nick Cox" <[email protected]>
To   <[email protected]>
Subject   st: RE: RE: RE: reading the first X letters of a filename
Date   Tue, 19 Jul 2005 02:19:30 +0100

Try again: 

Nick 
[email protected] 

> -----Original Message-----
> From: Nick Cox 
> Sent: 19 July 2005 02:12
> To: '[email protected]'
> Subject: RE: RE: RE: reading the first X letters of a filename
> 
> 
>  ssc inst fs 
>  fs *bilateral.csv 
>  foreach f in `r(files)' { 
>  	insheet using `"`f'"' 
>  	local country : substr local f "bilateral.csv" ""
>  	gen country = "`country'" 
>  	...
>  } 
> 
> Nick 
> [email protected] 
> 

*
*   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