Jump to content

Recommended Posts

Posted

Hi everyone,

Long time since i've been on here now. I've got a quick question.

Does anyone know how I can get the following code to not display a dialogue box asking me if I want to overwrite files already within the directory.

_FileCopy ($working_location & "*", $backup_location)

Func _FileCopy($fromFile,$tofile)
Local $FOF_RESPOND_YES = 16
Local $FOF_SIMPLEPROGRESS = 256
$winShell = ObjCreate("shell.application")
$winShell.namespace($tofile).CopyHere($fromFile,$FOF_RESPOND_YES)

EndFunc
Posted

Odd. Your example will repeatedly re-copy and overwrite an existing file for me without any prompt. Only if I remove the $FOF_RESPOND_YES parameter will it ask for confirmation. XP Pro SP3 here. Maybe Vista behaves differently.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...