Bookmark and Share

Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.


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

Re: st: return code for copy


From   Roberto Ferrer <[email protected]>
To   Stata Help <[email protected]>
Subject   Re: st: return code for copy
Date   Mon, 3 Feb 2014 00:53:28 -0430

Have you taken a look at -capture- ?

*-------------
.  copy http://www.nber.org/papers/wrong19862.pdf temp.pdf, replace
(note: file temp.pdf not found)
file http://www.nber.org/papers/wrong19862.pdf not found
r(601);

. display _rc
0

*---------------
. capture copy http://www.nber.org/papers/wrong19862.pdf temp.pdf, replace

. display _rc
601

*--------------
. capture noisily copy http://www.nber.org/papers/wrong19862.pdf
temp.pdf, replace
(note: file temp.pdf not found)
file http://www.nber.org/papers/wrong19862.pdf not found

. display _rc
601

Run -help capture- and -help noisily- for details.

On Mon, Feb 3, 2014 at 12:36 AM, Li Chuntao (Tony) <[email protected]> wrote:
> Dear Listers,
>
>       This could be a very narive question. I just want to know if
> there is a return code for copy command.
>
>     Say, what is the return code for the following command? and how to
> access (maybe just display) this return code?
>
> copy http://www.nber.org/papers/w19862.pdf temp.pdf, replace
>
> and what is the return code for the following wrong code? and how to
> access the code?
>
> copy http://www.nber.org/papers/wrong19862.pdf temp.pdf, replace
>
>
> thanks
>
>
> Tony
> *
> *   For searches and help try:
> *   http://www.stata.com/help.cgi?search
> *   http://www.stata.com/support/faqs/resources/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/faqs/resources/statalist-faq/
*   http://www.ats.ucla.edu/stat/stata/


© Copyright 1996–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index