Thank you all for the suggestions. I was able to solve
the problem by naming all the files 1,2,3 etc instead
of file1.dta, file2.dta. The body of the programs is
very simple though. Nothing with i or anything. All
that the program does is to drop, gen, and replace
variables.
Tj
--- "Rodrigo A. Alfaro" <[email protected]> wrote:
> I deal with the long-directories in the following
> way: typing at the
> beginning
> the directory where I am going to work...
>
> cd "c:\My Personal Files\My Really Personal Data\My
> Secret Place"
>
> then you can fix your program with
>
> use file`i', clear
> save file`i', replace
>
> Rodrigo..
>
>
> ----- Original Message -----
> From: "T.J. Volant" <[email protected]>
> To: <[email protected]>
> Sent: Friday, February 23, 2007 6:30 PM
> Subject: Re: st: RE: saving enumerated file names at
> the end of a loop-more
> info
>
>
> > Thanks, but it doesn't work. The problem persists,
> so
> > weird.
> >
> >
> > --- Rajesh Tharyan <[email protected]> wrote:
> >
> >> Hi,
> >>
> >> Sorry forgot the link to the explanation ..
> >>
> >> See this link
> >>
> >> How do I assign multiple backslash characters to
> >> macros in Stata?
> >>
> >>
> >
>
http://www.stata.com/support/faqs/lang/backslash.html
> >>
> >> also there have been previous posts on this
> problem
> >>
> >> hth
> >> rajesh
> >>
> >> -----Original Message-----
> >> From: [email protected]
> >> [mailto:[email protected]] On
> >> Behalf Of T.J. Volant
> >> Sent: 23 February 2007 19:39
> >> To: [email protected]
> >> Subject: st: saving enumerated file names at the
> end
> >> of a loop
> >>
> >> Hello all,
> >>
> >> I'm running a program through bunch of files(
> >> file1.dta, file2.dta, etc) I am opening them and
> >> would
> >> like to save them as replace. It opens fine, but
> >> saving doesn't work.
> >>
> >> My code:
> >>
> >> forv i=1(1)48 {
> >> use "C:\WINNT\Desktop\file`i'.dta"
> >>
> >> * body of the program *
> >>
> >> save "C:\WINNT\Desktop\file`i'.dta", replace
> >> clear
> >> }
> >>
> >> When it saves, it only saves file.data, not
> >> file1.dta,
> >> etc. Why?
> >> Thank you very much in advance,
> >>
> >> Tj
> >>
> >>
> >>
> >>
> >
>
____________________________________________________________________________
> >> ________
> >> Get your own web address.
> >> Have a HUGE year through Yahoo! Small Business.
> >>
> http://smallbusiness.yahoo.com/domains/?p=BESTDEAL
> >> *
> >> * 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/
> >>
> >
> >
> >
> >
> >
>
____________________________________________________________________________________
> > We won't tell. Get more on shows you hate to love
> > (and love to hate): Yahoo! TV's Guilty Pleasures
> list.
> > http://tv.yahoo.com/collections/265
> > *
> > * 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/
>
____________________________________________________________________________________
The fish are biting.
Get more visitors on your site using Yahoo! Search Marketing.
http://searchmarketing.yahoo.com/arp/sponsoredsearch_v2.php
*
* 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/