> Whenever I try to use the CopyFileTo method, this takes over
> everything, even in a thread. Is there a way to make this run in the
> background?
You can create your own Copy method that runs in a thread. Just use a
BinaryStream to copy the file over. Something like this:
Dim fromFile, toFile as FolderItem
Dim fromStream, toStream as BinaryStream
' Get fromFile and toFile
...
' Open the streams up
fromStream = fromFile.OpenAsBinaryFile( false )
toStream = toFile.CreateBinaryFile( "" )
' Copy the data from one stream to the other
while not fromStream.EOF
toStream.Write( fromStream.Read( 1024 ) )
wend
' Close the stream
fromStream.Close
toStream.Close
Note that there's no error checking -- you'll want to add that. But this
will copy the files over in the background if you put it in a thread.
HTH!
~Aaron
_______________________________________________
Unsubscribe or switch delivery mode:
<http://support.realsoftware.com/listmanager/>
Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>
|