HiTek Software Home
 
Dynamically download URLs that are specified in a text file
Date Updated  -  07/22/2007
Description
User question:  I have an application that must download different URL's. Can your software download a URL specified in a small text file that changes say every few minutes?
Solution

The text file 'c:\test\url.txt' should specify on the first line, the URL to download.  Use Automize system variable 'FILE::......' to dynamically read in the first line of this file.  

Create a Web task using the following settings:
Download URL = $%FILE::LINE::FIRST::c:\test\url.txt%$

Below is the output of such a test:

Sep 16, 2002 2:12:23 PM   Web - web

Sep 16, 2002 2:12:23 PM   Parsing variables: Input=$%FILE::LINE::FIRST::c:\test\url.txt%$

Sep 16, 2002 2:12:23 PM  Finished parsing variables: Result=http://www.cnn.com

Sep 16, 2002 2:12:26 PM
Finished downloading: http://www.cnn.com
Downloaded filename = C:\test\web.htm
Downloaded file size in bytes = 41658

Sep 16, 2002 2:12:27 PM  Web - web - Exit Code = 0