Improve your productivity and save time.  Let your system work for you.
HiTek Software Home
 
Subject How to merge todays files into one composite file
Version 6.x
Date   07/22/2007
Message Hello, 
I have been trying your trial version of Automize and am quite happy and would like to purchase it..but I need to try and get it to do something for me...right now I have a task that visits a url containing a text file every 10mins and it saves it in a directory with the DATE and TIME format as its name...what I need to do is setup a task that will go to that directory say every 60mins, merge only the files with todays DATE and TIME and save the results to another file say for example results.txt
Reply1 Hi, 
Thanks for evaluating Automize. 
You would have to insert/append the new dowloaded file to a BASE file using the File Variable task. 
Additionally, you would have to download the webpages (textfiles) to a staging folder which contains the BASE file. 
After the new file is inserted/appended into the BASE file, you would have to move the webpage (textfile) to the final storage folder. 
To do this, you would have to create the following tasks: 

1) your web task Download folder = [Staging folder] which contains BASE file. 

2) A File Monitor task (Title = FileMon). |
This simply gets the name of the last downloaded file. 
Directory = [Staging folder] 
Filename = none 
Task To Run = NONE 
Select Option = Run Task if file exists 
The FileMonitor task will now contain the variable $%FileMon::FileName%$ which is the name of the last downloaded web page. 

3) a File Variable task to append file to the BASE file 
variable name = $%FILE::LINE::MID::0::10000::full_BASE_file_path%$ 
File Path = [Staging Folder]\$%FileMon::FileName%$ 
Select Filing options as needed 

4) a Copy task - This moves the file from the staging folder to a final folder. This is required for the FileMonitor task to work correctly in the next scheduled run. 
Option = Move 
Source Folder = [Staging Folder] 
Target Folder = [Final Folder] 
Filename = $%FileMon::FileName%$ 

5) a chain task (use big blue links icon on front panel). 
Step 1 = Web Task 
Step 2 = File Monitor task 
Step 3 = File Variable task 
Step 4 = Copy task 

6) Instead of scheduling the web task to run every X minutes, schedule this chain every X minutes. 

This is an interesting problem. We will add this to our user case studies on our website. 

-- Sincerely, Melvin Desilva Hitek Software

Reply2
Reply3
Reply4
Reply5