Statalist The Stata Listserver


[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

Re: st: copy a folder


From   "Sergio Correia" <[email protected]>
To   [email protected]
Subject   Re: st: copy a folder
Date   Mon, 18 Dec 2006 00:19:30 -0500

Look at the -shell- command, it allows you to execute a windows
command from stata.

For example:

shell xcopy "C:/My Folder" "G:/My Other Folder" /I

Will copy the contents of "my folder" to a new folder called "my other
folder" located on the G drive.

Check the help for xcopy (you need to do this: start menu, execute,
cmd, help xcopy - at least in winxp) in order to get more options
(copying hidden folders, overwriting files automatically, etc).

Cheers,
Sergio

PS: As stated before, your mileage may vary depending on your operating system.

On 12/17/06, Rodrigo Martell <[email protected]> wrote:
Hi,

I'm trying to include code to copy a folder that sits on my C drive to another drive, say G drive.

so I want to copy the folder "C:/My folder" (and all its contents) to "G:/My other folder".

I can do this with single files using -copy- but I'd like to do this more efficiently with a single command to copy the entire folder.
I've searched the list and the help files but can't find what I'm looking for.

I'd appreciate a hand.

Cheers,

Rodrigo

Rodrigo Martell

 <http://www.frontier-economics.com>
Frontier Economics Pty. Ltd.
395 Collins Street
Melbourne VIC 3000
Australia
www.frontier-economics.com
switch:
direct:
fax:
mobile:
email:


+61 (0)3 9620 4488
+61 (0)3 9613 1518
+61 (0)3 8614 2711
+61 (0)407 909 811
[email protected] <mailto:[email protected]>


This e-mail, including any attachments, may contain confidential and privileged information for the sole use of the intended recipient(s). Any review, use, disclosure or distribution by others is strictly prohibited. If you are not the intended recipient (or authorised to receive information for the recipient), please contact the sender by reply e-mail and delete all copies of this message. Thank you.


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



© Copyright 1996–2024 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index