Hi. Is there some reason why you cannot use Copyfolder once again?
I use the filesystem object to copy a database file from a live location to an off-line location on a different server. The bare code for doing so (without the setting of the from and to strings and all the user messages etc concerned) is extracted and listed below:
- Dim fso As Object, f2 As Object
-
Dim strCopyFrom As String, strCopyTo As String
-
Set fso = CreateObject("Scripting.FileSystemObject")
-
..<from and to strings need to be passed as parameters or otherwise set before use>..
-
Set f2 = fso.GetFile(strCopyFrom)
-
f2.Copy (strCopyTo)
-
Set fso = nothing
-
Set f2 = nothing
However, writing to a CD drive may be problematic, as the files may well need to be cached until you write them to the drive under manual control. It may well be better to write the folder to a temporary folder area and then transfer them to CD when your drive writing software is available under manual control...
-Stewart