Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
filesystemobject
Hi
know this is excel forum but i don't know where else to write this With filesystemobject i use createfolder and delete folder but i can't find out how to use copy *.* from one folder to another folder Hope some one can help -- Alvin |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
filesystemobject
Hi Alvin ,
But you know how helpful we are :-). FileSystemObject.CopyFolder "c:\mydocuments\letters\*", "c:\tempfolder\" These are the commenst on the MSDN page If source contains wildcard characters or destination ends with a path separator (\), it is assumed that destination is an existing folder in which to copy matching folders and subfolders. Otherwise, destination is assumed to be the name of a folder to create. In either case, four things can happen when an individual folder is copied. a.. If destination does not exist, the source folder and all its contents gets copied. This is the usual case. b.. If destination is an existing file, an error occurs. c.. If destination is a directory, an attempt is made to copy the folder and all its contents. If a file contained in source already exists in destination, an error occurs if overwrite is false. Otherwise, it will attempt to copy the file over the existing file. d.. If destination is a read-only directory, an error occurs if an attempt is made to copy an existing read-only file into that directory and overwrite is false. An error also occurs if a source using wildcard characters doesn't match any folders. The CopyFolder method stops on the first error it encounters. No attempt is made to roll back any changes made before an error occurs. -- HTH RP (remove nothere from the email address if mailing direct) "Alvin Hansen" wrote in message ... Hi know this is excel forum but i don't know where else to write this With filesystemobject i use createfolder and delete folder but i can't find out how to use copy *.* from one folder to another folder Hope some one can help -- Alvin |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
filesystemobject
The copyfile method - see
http://msdn.microsoft.com/library/de...gwithfiles.asp "Alvin Hansen" wrote: Hi know this is excel forum but i don't know where else to write this With filesystemobject i use createfolder and delete folder but i can't find out how to use copy *.* from one folder to another folder Hope some one can help -- Alvin |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
filesystemobject
Yes yes yes
thank you, thank you Alvin "Bob Phillips" skrev: Hi Alvin , But you know how helpful we are :-). FileSystemObject.CopyFolder "c:\mydocuments\letters\*", "c:\tempfolder\" These are the commenst on the MSDN page If source contains wildcard characters or destination ends with a path separator (\), it is assumed that destination is an existing folder in which to copy matching folders and subfolders. Otherwise, destination is assumed to be the name of a folder to create. In either case, four things can happen when an individual folder is copied. a.. If destination does not exist, the source folder and all its contents gets copied. This is the usual case. b.. If destination is an existing file, an error occurs. c.. If destination is a directory, an attempt is made to copy the folder and all its contents. If a file contained in source already exists in destination, an error occurs if overwrite is false. Otherwise, it will attempt to copy the file over the existing file. d.. If destination is a read-only directory, an error occurs if an attempt is made to copy an existing read-only file into that directory and overwrite is false. An error also occurs if a source using wildcard characters doesn't match any folders. The CopyFolder method stops on the first error it encounters. No attempt is made to roll back any changes made before an error occurs. -- HTH RP (remove nothere from the email address if mailing direct) "Alvin Hansen" wrote in message ... Hi know this is excel forum but i don't know where else to write this With filesystemobject i use createfolder and delete folder but i can't find out how to use copy *.* from one folder to another folder Hope some one can help -- Alvin |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Scripting.FileSystemObject | Excel Discussion (Misc queries) | |||
Help using FileSystemObject CopyFile | Excel Programming | |||
FileSystemObject | Excel Programming | |||
FileSystemObject Error | Excel Programming | |||
Help with FileSystemObject? | Excel Programming |