Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 3097
  • Last Modified:

autoit copy one directory and its structure to another directory with progress bar

Is there a way to copy for instance
e:\setupfiles\*.* to c:\somefolder
and make it show a progress bar and at the same time only copy files that are none existing?

i'm wanting to use something like this:
Func _FileCopy($pFrom,$pTo)
    ;Forget the flags.  They don't appear to work at all
    Local $FOF_NOCONFIRMMKDIR = 512
    Local $FOF_NOCONFIRMATION = 16
    If FileExists($pTo) Then DirRemove($pTo,1);This removes the directory and all its file to prevent the annoying overwrite file confirmation message
    DirCreate($pTo)
    $winShell = ObjCreate("shell.application")
    $winShell.namespace($pTo).CopyHere($pFrom)
EndFunc

Open in new window


i can't get the below method to work at least not for visual

RunWait(@ComSpec & " /c " & 'xcopy "' & 'e:\setupfiles\*.*' & '" "' & "c:\somefolder" & '" /D /E /C /R /H /I /K /Y')

Open in new window

0
bbimis
Asked:
bbimis
1 Solution
 
ThommyCommented:
Have a look at below udf function for copying with progress bar...
dircopy bzw filecopy mit progressbar

Adapt the included xcopy command to your needs...
0
 
bbimisAuthor Commented:
thanks this worked
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Tackle projects and never again get stuck behind a technical roadblock.
Join Now