Does anyone know of an efficient way of reporting the status (% complete) of
the folderobject.copy method?

I'm using the following to copy fair amounts of data (700 - 1000 Mb) in a
complexe directory structure.

*******************

Set fso = CreateObject("Scripting.FileSystemObject")
Set folderObject = fso.GetFolder("D:\somepath")

folderObject.Copy "e:\",TRUE

******************
I need to be able to show progress in either a progress bar or at the vey
least by feeding a percentage completed to a log windows.(wihich I already
have built using IE and an hta form.

Thanks


Pierre

Re: Copy folder and progress bar. by TDM

TDM
Mon Aug 25 13:00:07 CDT 2003


Pierre,

If you are on Win2K/XP, you can try the CopyHere method and it will show you
the same status as a copy using the explorer.

Const noDialog = 4 'Do not display a progress dialog box
Const moveOrRenameTrue = 8 'Rename if target exists
Const yesToAll = 16 'Answer yesToAll for all questions
Const undoPreserve = 64 'Preserve undo information, if possible
Const onlyOnWildcard = 128 'Perform operation on files only if wildcard
file name (*.*) specified.
Const displayProgress = 256 'Display a progress dialog box but do not show
the file names.
Const noConfirmDirCreate = 512 'Do not confirm directory creation if one
needs to be created.
Const noDispErrors = 1024 'Do not display a user interface if an error
occurs
Const noCopySecurityBits = 2048 'Do not copy the security attributes of the
file.
Const noDirRecurse = 4096 'Only operate in the local directory no recursion
Const noConnectedFiles = 9182 'Do not copy connected files as a group.

Dim objCP
Dim toFolder

Set objCP = CreateObject("Shell.Application")
Set toFolder = objCP.NameSpace("e:\")
toFolder.CopyHere "d:\somepath", moveOrRenameTrue + yesToAll +
noConfirmDirCreate + noDispErrors

My only gripe is that when it errors out, you have no way of knowing how far
it got, but then
the same holds true for the .Copy method as well, and I am not aware of any
way to
continue on error.

TDM

"Pierre" <Pierre.roman@nospam.qunara.com> wrote in message
news:O67hocyaDHA.1872@TK2MSFTNGP12.phx.gbl...
> Does anyone know of an efficient way of reporting the status (% complete)
of
> the folderobject.copy method?
>
> I'm using the following to copy fair amounts of data (700 - 1000 Mb) in a
> complexe directory structure.
>
> *******************
>
> Set fso = CreateObject("Scripting.FileSystemObject")
> Set folderObject = fso.GetFolder("D:\somepath")
>
> folderObject.Copy "e:\",TRUE
>
> ******************
> I need to be able to show progress in either a progress bar or at the vey
> least by feeding a percentage completed to a log windows.(wihich I already
> have built using IE and an hta form.
>
> Thanks
>
>
> Pierre
>
>



Re: Copy folder and progress bar. by Fosco

Fosco
Tue Aug 26 08:47:07 CDT 2003

"Pierre"

Const FOF_SIMPLEPROGRESS = 256
set winShell = createObject("shell.application")
winShell.namespace("C:\Dest").CopyHere "C:\Start\*"
--
Fosco



Re: Copy folder and progress bar. by Pierre

Pierre
Tue Aug 26 22:27:00 CDT 2003

Thanks to both of you. worked like a charm....

Pierre

"Fosco" <fake@fake.invalid> wrote in message
news:vxJ2b.41279$zN5.1299084@news1.tin.it...
> "Pierre"
>
> Const FOF_SIMPLEPROGRESS = 256
> set winShell = createObject("shell.application")
> winShell.namespace("C:\Dest").CopyHere "C:\Start\*"
> --
> Fosco
>
>