PC Review


Reply
Thread Tools Rate Thread

Copy a folder and objects

 
 
John
Guest
Posts: n/a
 
      1st Jul 2006
From a workbook I wanted a button that would copy a folder to another
drive. After dinging around I came up with this:

Set CpyFolder = CreateObject("Scripting.FileSystemObject")
CpyFolder.CopyFolder "c:\TestIt", "d:\TestIt", overwrite
End Sub

This works but I have no idea why. The CopyFolder only works if you use
a Set = something then use the Something.copyfolder. This seems just
idiotic and useless.

Why not just "Copy c:\folder, d:\folder" and make it easy? What is the
purpose of adding the complication of objects?

Also... the copy process was 10 times slower than dragging it in xp.

Is there a faster way of doing it?

Thanks

John

 
Reply With Quote
 
 
 
 
Ron de Bruin
Guest
Posts: n/a
 
      1st Jul 2006
hi John

> Why not just "Copy c:\folder, d:\folder" and make it easy?

You can do that with files

Or use Name to move a folder

It is not fast if you copy, maybe windows shell is faster ? but with the FileSystemObject
you can test easily if a folder exist.

I have some info here
http://www.rondebruin.nl/folder.htm

I update it this weekend with specialfolder info


--
Regards Ron de Bruin
http://www.rondebruin.nl



"John" <(E-Mail Removed)> wrote in message news:%(E-Mail Removed)...
> From a workbook I wanted a button that would copy a folder to another drive. After dinging around I came up with this:
>
> Set CpyFolder = CreateObject("Scripting.FileSystemObject")
> CpyFolder.CopyFolder "c:\TestIt", "d:\TestIt", overwrite
> End Sub
>
> This works but I have no idea why. The CopyFolder only works if you use a Set = something then use the Something.copyfolder. This
> seems just idiotic and useless.
>
> Why not just "Copy c:\folder, d:\folder" and make it easy? What is the purpose of adding the complication of objects?
>
> Also... the copy process was 10 times slower than dragging it in xp.
>
> Is there a faster way of doing it?
>
> Thanks
>
> John
>



 
Reply With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Copy Worksheet wont copy objects. Lincoln De Kalb Microsoft Excel Worksheet Functions 7 12th Jan 2009 10:30 PM
Transform DocumentItem Objects as Outlook Item Objects in folder Wnick Microsoft Outlook VBA Programming 5 22nd Feb 2008 07:59 PM
Copy objects pnp Microsoft C# .NET 6 23rd Jun 2005 03:56 PM
Copy objects? =?Utf-8?B?SE1TMjAwMw==?= Microsoft Powerpoint 4 4th Dec 2003 05:19 AM
copy objects via VBA Patrick Microsoft Access VBA Modules 1 22nd Sep 2003 05:49 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 08:29 AM.