| |
[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]
RE: st: Windows batch mode not working-solved
Thanks to everyone who responded to my question. John's astute
observation provided the solution. There was a stray space between the
path and wstata.
The correct command is as follows:
C:\data>"C:\Program Files\Stata9\"wstata /e do c:\data\outstata7.do
Please excuse me while I wipe the egg from my face.....
Cheers,
Paul
-----Original Message-----
From: [email protected]
[mailto:[email protected]] On Behalf Of John Bigelow
Sent: Wednesday, December 20, 2006 10:12 AM
To: Stata ListServe Address for Posting
Subject: Re: st: Windows batch mode not working
Apologies for posting this twice, but my hand slipped and I hit the send
button before this was fully edited with my typos and mistakes cleared
out.
Please ignore the first version, and I will try to get it right here.
Paul Bednar wrote as follows:
__________________________________________
Date: Tue, 19 Dec 2006 18:16:48 -0500
From: "Bednar, Paul" <[email protected]>
Subject: st: Windows batch mode not working
Dear Statalisters,
I'm unable to successfully run a batch file in Windows XP following this
link: http://www.stata.com/support/faqs/win/batch.html.
This is frustrating because the batch file runs perfectly when I have a
Stata session open and run it from the command line.
First, I cd to the directory where Stata9 is installed: C:\Program
Files\Stata9\. Next I type wstata /e do c:\data\outstata7.do. I see
the Stata command window appear, vanish, and the Windows command line
appears indicating the batch is complete. However, the batch doesn't
execute.
I've tried cd'ing to where the batch file resides (C:\data) and have
typed:
"C:\Program Files\Stata9\" wstata /e do c:\data\outstata7.do. The
results are the same as the prior paragraph.
The above link requires the user to enter the command after clicking the
Start button and selecting "Run". This hasn't worked either because if
I enter the following in the text box: C:\Program Files\Stata9\wstata /e
do c:\data\outstata7.do Windows gives an error saying it can't find
C:\Program. If I leave off the install directory path, Windows gives an
error that it can't find wstata.
Any insight is greatly appreciated.
Cheers,
Paul
________________________________________________________________
I have a few observations, based on the assumption that the commands you
reproduced in your message are exactly as you typed them.
1) The command you typed in the command window
"C:\Program Files\Stata9\" wstata /e do c:\data\outstata7.do
has what appears to be a stray space before wstata.
I wonder if that could cause the command window not to find the command
you
want to run.
2) The command you entered in the "Run" text box,
C:\Program Files\Stata9\wstata /e do c:\data\outstata7.do
has no quotes around the path "C:\Program Files\Stata9\wstata"
That will certainly cause a problem because the command window will
think
that its first argument (i.e., the path and name of the executable its
looking for) is C:\Program so your computer is looking for file named
Program.exe in your root directory, C:\ Put quotes around the full path
to
try for a better result.
3) The executable file on my computer is not named wstata.exe. It's
wsestata.exe.
Also, the path to my executable is "C:\Program Files\Stata9"
Putting all three observations together, if I want to run in batch mode
I
have to issue the command
"C:\Program Files\Stata9\wsestata" /e do c:\data\batchtest.do
and then the batch job will run.
So, summing up, I would suggest:
*Check for stray spaces in the command line.
*Enclose any path that includes a needed space in quotes ""
*Check the path to your executable.
*Check the name of your executable.
I hope this helps.
John P. Bigelow
The Princeton Economics Group
707 State Road, Princeton NJ 08540
609.279.0600.x224 (Voice) 609.279.0201 (Fax)
________________________________
--
No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.5.432 / Virus Database: 268.15.25/593 - Release Date:
12/19/2006
1:17 PM
*
* 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/