Bookmark and Share

Notice: On March 31, it was announced that Statalist is moving from an email list to a forum. The old list will shut down at the end of May, and its replacement, statalist.org is already up and running.


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

st: RE: rename files - "! rename" doesn't work


From   "Nick Cox" <n.j.cox@durham.ac.uk>
To   <statalist@hsphsun2.harvard.edu>
Subject   st: RE: rename files - "! rename" doesn't work
Date   Fri, 16 Apr 2010 15:39:00 +0100

This is a matter of Windows command prompt syntax. The second argument,
it seems, cannot include anything but the filename. 

! rename D:\myauto.dta \yourauto.dta

I really have _nothing_ to do with that syntax choice! 

Nick 
n.j.cox@durham.ac.uk 

Hewan Belay

Following Nick's guidelines in
 http://www.stata.com/statalist/archive/2008-05/msg00254.html 
I tried to rename dta files from within stata but it didn't work. Here
is what I tried:

webuse auto
save "D:\myauto.dta", replace
! rename "D:\myauto.dta"  "D:\yourauto.dta"

All that happens is, a small window flashes in and then back out in a
split of a second. When I go to Windows explorer and look at the D/
folder, I still find myauto there, not yourauto. I refreshed the windows
explorer, and also closed and opened it again, but it's still myauto. By
way of information, my operating system is Windows XP Professional, and
I'm using Stata 11. I tried the above also with -shell rename- instead
of -! rename-, but the same thing happens. What could be the problem?


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