Re: Show progress of copying



Joe,

It's not nearly as well documented but if you use the "Shell.Application"
object rather than the "Scripting.FileSystemObject" to copy the folder, you
will get the standard Windows Explorer show progress bar for copying or
moving files and folders. Try something like:

Sub CopyShowProgress()
Const FOF_SIMPLEPROGRESS = &H100
Dim Shell, Folder
toFldr = "C:\Temp"
fromFldr = "C:\Test"
Set Shell = CreateObject("Shell.Application")
Set Folder = Shell.Namespace(fromFldr)
Folder.CopyHere toFldr, FOF_SIMPLEPROGRESS
Set Shell = Nothing
End Sub

Steve



"Joe" <Joe.Varghese.John@xxxxxxxxx> wrote in message
news:ff9aa50e-8ad8-49ea-a3a2-68366ecdaf25@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Dear all,

I am using Excel 2003 SP2 and VB 6.3

I am trying to use Excel to copy from the server.
for that I use "scripting.filesystemobject" to get the list of files.

'my code is..........
'**********************
Function Copy_Data(ByVal fromFolder As String, ByVal toFolder As
String)

Dim FSO As Object
Set FSO = CreateObject("scripting.filesystemobject")
FSO.copyfolder fromFolder, toFolder

End Function
'**********************

I need to show some kind of progress window. Since the folders are
very big, it takes a lot of time to finish copying.. Is it possible
to show any progress and if so how?????

Thank you.....

Reagrds
Joe


.