Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Copy folder and paste to another folder
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 |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Copy folder and paste to another folder
Dim oFSO As Object
Set oFSO = CreateObject("Scripting.FileSystemObject") oFSO.CopyFolder "c:\mydocuments\*\*", "c:\tempfolder\", True -- HTH Bob Phillips "ddiicc" wrote in message ... 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 |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Copy folder and paste to another folder
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" wrote in message ... 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 |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
Copy folder and paste to another folder
I am trying to do the same thing except my source directory changes wit 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 m macro stops. I've tried all kinds of stuff and I can't get around th error -- karrde9 ----------------------------------------------------------------------- karrde97's Profile: http://www.excelforum.com/member.php...fo&userid=2546 View this thread: http://www.excelforum.com/showthread.php?threadid=38782 |
#5
Posted to microsoft.public.excel.programming
|
|||
|
|||
Copy folder and paste to another folder
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! -- karrde97 ------------------------------------------------------------------------ karrde97's Profile: http://www.excelforum.com/member.php...o&userid=25461 View this thread: http://www.excelforum.com/showthread...hreadid=387823 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
How to decide folder-depth or How to select more folders/subfolders (folder-tree) ? | Excel Discussion (Misc queries) | |||
how can I specific a folder with wildcard criteria and excel will import all the correct files in that folder? | Excel Discussion (Misc queries) | |||
How to copy 30 csv files from a folder to another folder | Excel Programming | |||
VBA to copy and paste folder | Excel Programming | |||
Create Folder / Copy Folder / Replace | Excel Programming |