jbennett Posted March 20, 2009 Share Posted March 20, 2009 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 Link to comment Share on other sites More sharing options...
Authenticity Posted March 20, 2009 Share Posted March 20, 2009 Check if the file exists and delete it and then copy the file. Link to comment Share on other sites More sharing options...
Spiff59 Posted March 20, 2009 Share Posted March 20, 2009 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. Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now