Hi there,
Can anyone kindly tell me what is the script for the macro,
for copying a folder, then pasting and overwrite to another folder.
Pls help
Hi there,
Can anyone kindly tell me what is the script for the macro,
for copying a folder, then pasting and overwrite to another folder.
Pls help
Dim oFSO As Object
Set oFSO = CreateObject("Scripting.FileSystemObject")
oFSO.CopyFolder "c:\mydocuments\*\*", "c:\tempfolder\", True
--
HTH
Bob Phillips
"ddiicc" <ddiicc@discussions.microsoft.com> wrote in message
news:D6753682-5B56-4905-B63C-AE513CFB3C63@microsoft.com...
> Hi there,
> Can anyone kindly tell me what is the script for the macro,
> for copying a folder, then pasting and overwrite to another folder.
>
> Pls help
Thanks alot Bob..
"Bob Phillips" wrote:
> Dim oFSO As Object
> Set oFSO = CreateObject("Scripting.FileSystemObject")
> oFSO.CopyFolder "c:\mydocuments\*\*", "c:\tempfolder\", True
>
>
> --
> HTH
>
> Bob Phillips
>
> "ddiicc" <ddiicc@discussions.microsoft.com> wrote in message
> news:D6753682-5B56-4905-B63C-AE513CFB3C63@microsoft.com...
> > Hi there,
> > Can anyone kindly tell me what is the script for the macro,
> > for copying a folder, then pasting and overwrite to another folder.
> >
> > Pls help
>
>
>
I am trying to do the same thing except my source directory changes with each operation.
my_path2 = (source directory)
my_save2 = (target directory)
Dim fso As Object
Set fso = CreateObject("Scripting.FileSystemObject")
Set a = fso.copyfolder(my_path2, my_save2, True)
The directory gets copied except I get a Type mismatch error and my macro stops. I've tried all kinds of stuff and I can't get around the error.
Nevermind. Looks like I had some issues with my string not being formatted correctly. Works perfect now. Bob, your code help get me back on track. Thanks!
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks