I have a script that downloads a zip file from the server and after it has downloaded is extracted to a particular folder on my harddrive. It runs great (thanks bob) but when one of the picture files already exists in that folder a pop up message asks if I want to overwrite this file. This is where my script is running into a problem. It will not finish executing if there is a pic file that already exists. It would run fine if no files already existed but such is not the case. So my question is how do I (if the message box pops up) continue running through the script. In other words extract the zip file of pics and if this message box pops up overwrite the files and if not just keep extracting the files to this folder?
Hope that made some sense. Excuse the newbie~!
Have a great day and thanks for any help anyone can provide.
-macrunning
Overwrite Files
Moderators: JRL, Dorian (MJT support)
- Bob Hansen
- Automation Wizard
- Posts: 2475
- Joined: Tue Sep 24, 2002 3:47 am
- Location: Salem, New Hampshire, US
- Contact:
I see at least two options:
1. Before downloading do IfFileExists>..... and rename or delete file or stop downloading or any other way to respond. This will eliminate the "overwrite" window from coming up.
2. Modify script after download with WaitWindowOpen>......with a timeout that looks for the "overwrite window". If window opens then have script answer YES/NO and react accordingly.
My own choice would be the first one, only because it is easier.
1. Before downloading do IfFileExists>..... and rename or delete file or stop downloading or any other way to respond. This will eliminate the "overwrite" window from coming up.
2. Modify script after download with WaitWindowOpen>......with a timeout that looks for the "overwrite window". If window opens then have script answer YES/NO and react accordingly.
My own choice would be the first one, only because it is easier.
Hope this was helpful..................good luck,
Bob
A humble man and PROUD of it!
Bob
A humble man and PROUD of it!
-
- Pro Scripter
- Posts: 68
- Joined: Wed May 04, 2005 10:24 pm
Maybe the second one
The first resolution sounds good but I don't know which pic files in the zip file I'm downloading are going to be duplicates in my destination folder. I will look at the second option and see if I can figure it out.
Thanks again bob and have a good one.
later,
macrunning
Thanks again bob and have a good one.
later,
macrunning