Test before Downloading

Support for iMacros. The iMacros software is the unique solution for automating every activity inside a web browser, for data extraction and web testing.
Forum rules
iMacros EOL - Attention!

The renewal maintenance has officially ended for Progress iMacros effective November 20, 2023 and all versions of iMacros are now considered EOL (End-of-Life). The iMacros products will no longer be supported by Progress (aside from customer license issues), and these forums will also no longer be moderated from the Progress side.

Thank you again for your business and support.

Sincerely,
The Progress Team

Before asking a question or reporting an issue:
1. Please review the list of FAQ's.
2. Use the search box (at the top of each forum page) to see if a similar problem or question has already been addressed.
3. Try searching the iMacros Wiki - it contains the complete iMacros reference as well as plenty of samples and tutorials.
4. We can respond much faster to your posts if you include the following information: CLICK HERE FOR IMPORTANT INFORMATION TO INCLUDE IN YOUR POST
Post Reply
Boomerang
Posts: 11
Joined: Fri Mar 21, 2008 1:26 pm

Test before Downloading

Post by Boomerang » Tue Apr 08, 2008 9:21 am

Hello:


I have a macro that successfullly downloads files my Internet files. Whenever new files are posted to my online source, I would like to download those new files. However, before downloading any file, I need to be able to check to see if that files already exists in the iMacro default download location on my local hard drive.

The basc download macro segment is as follows:
----------------------------------------------------------------------------------------------------------
ONDOWNLOAD FOLDER=* FILE=*
TAG POS=1 TYPE=INPUT:BUTTON FORM=NAME:frmPlay+-Download ATTR=VALUE:Download
----------------------------------------------------------------------------------------------------------

* How can I modify this macro segment so that the download is performed ONLY IF that file has NOT already been downloaded ?


Thanks,
Boomerang.
mknoll1
Posts: 174
Joined: Fri Dec 23, 2005 4:14 pm

Re: Test before Downloading

Post by mknoll1 » Tue Apr 08, 2008 2:43 pm

What is the harm in downloading a file a second time?

You could try making your files read only which should prevent the scripting engine from downloading them.
Ravendey
Posts: 15
Joined: Tue Apr 08, 2008 5:05 pm

Re: Test before Downloading

Post by Ravendey » Tue Apr 08, 2008 5:10 pm

There should be an option in imacros to download a file, but not to overwrite if the file already exists.
Last edited by Ravendey on Thu Apr 10, 2008 2:27 pm, edited 1 time in total.
sctchun
Posts: 4
Joined: Thu Dec 20, 2007 1:33 am

Re: Test before Downloading

Post by sctchun » Thu Apr 10, 2008 12:04 am

I'm not sure how you are getting your list of files for the download, but one solution is to use VBS.

Using the FileExists method under FileSystemObjects, you can do a search on that for some sample scripts.
You can break up your browser session script up and using VBS to string them together.

This solution requires the scripting version of iMacros.

Steven
Post Reply