FTP - Compare Files and Email Report
This sample task will compare the files that are located within a folder in an FTP site with files residing in a local folder. A Nested Loop occurs (Loop within a Loop) to evaluate whether the current file name specified in the FTP server matches that of any file names residing in the local directory. If the file names match, the task will then evaluate whether the file sizes are the same. If the file names and file sizes are identical, no download will occur for that particular file.
However, if the current file name residing in the FTP server does not match that of any file names residing in the local directory or if the file names match but the file sizes do not, the task will then write that particular file name to a text file. The text file will include the current date to differentiate it from the day before. Then it will download that particular file to the local directory. Lastly, it will email the newly created report to the proper individual.
This task is ideal for daily automated FTP transmissions, especially when dealing with large files. Not only will it create and email a daily report of the files being downloaded but it will alleviate the issue of having to download all files to a local directory even though the files already exist locally.
NOTE: In order for the task to work properly, please make changes to the 'FTP Logon' action to match your FTP Logon parameters. Also, make sure to adjust the steps specifying file locations to match your FTP server and local system directories.
| Download This Task (2.8kb) Sample_FTP_Compare.aml |
Would you like to upload a Sample Task or Workflow to the User Resource Center? Click here!
|
More Sample Tasks and Workflows
|
OCR & Active Directory (Workflow)
The new AutoMate and BPA Server 9 OCR actions have the ability to read, extract and convert ANY type of image, such as a bitmap, jpeg, png, pdf or tiff file into text for electronic automation and importation. Our extensive set of Windows Active Directory actions provides creating, modifying and managing any type of Object, User or Group. This sample workflow will read a name, address and telephone number from an application image, and create an Active Directory User with AutoMateâs OCR, Active Directory, Loop and Flow Control Actions. |
OCR & Active Directory (Task)
The new AutoMate and BPA Server 9 OCR actions have the ability to read, extract and convert ANY type of image, such as a bitmap, jpeg, png, pdf or tiff file into text for electronic automation and importation. Our extensive set of Windows Active Directory actions provides creating, modifying and managing any type of Object, User or Group. This sample task will read a name, address and telephone number from an application image, and create an Active Directory User with AutoMateâs OCR, Active Directory, Loop and Flow Control Actions. |
Using the split function to parse a text file
The sample program writes out a table text file to be used as input. Normally this would be created using a text editor such as Wordpad or Textpad. Excel could be used for table-driven processing as well. Excel is more powerful and versatile while text is faster and uses less memory. The text file of parameters is read in and separated by the character '#'. In the example it just displays the table parameters as they are read, but in general the parameters would be used to perform some table-driven process. Each line is split into three words using the Split() function and puts each word into a separate variable. |
Executing a DOS command and saving the output
This example executes the DOS 'dir' command on the C: drive and puts output into a text file for further processing. It is based on the blog "Executing Command-line Applications Using The Run Action". The C:\ drive in this example could be substituted with any mapped drive or folder. The 'dir' command has many options to obtain a variety of directory/file information. Any DOS command can be substituted for the 'dir' command in this example to capture the output of the command in a file. |
Creating a Radio Button List from an Array
A radio button list is an example of how to display a menu of options. One way to populate the list is by using an array. This is a simple example of creating the menu with an array of values. After the prompt, the program displays the selection. |
Sample Workflow: Memory, Disk Space Monitoring
This sample workflow for Business Process Automation (BPA) will demonstrate how to solve a computer and/or server problem by adding resolution automation management, system gathering and reporting for troubleshooting and speedy recovery. |
Update Your Tweets with AutoMate
Are you diehard twitter-er? If you are one of them, you most likely tweet using one of the many different ways to post updates: from the web in the update box, from your phone, from your mobile web browser, or from a third party application. This sample task allows you to tweet at the comfort of your computer without logging on to your personal or business twitter account. In fact, use a hot key trigger (e.g., Alt + A) to open a dialog box, enter your tweet, and press Enter. |
Get @Mentions Tweets and Populate to Excel
A mention is any Twitter update that contains @username anywhere in the body of the Tweet. This means that replies are also considered mentions. Twitter collects these messages, as well as all replies, and stores them in the @Mentions tab on your twitter homepage. This sample task connects to your personal or company twitter account, reads all tweets in the @Mentions tab, populates them in an Excel spreadsheet by Date Created, Twitter Message, and Twitter User, and sends an email notification with an Excel attachment. This task allows you to automate the monitoring of all activities related to your twitter account on a regular basis without having to logon to Twitter or manually parse through large volumes of data. |
Create a dynamic selection list of month and years
It can be handy sometimes to give the user a selection list of month and year, for example to generate a report for that certain period. This task generates the list and considering the current month it adds a year for months that have passed already. So when you run this in March 2012 it will show January 2013 Februari 2013 March 2012 April 2012 etc The selection shows next month as default. Edward Hulleman, Aug 4 2011 |
Create/Send Encrypted AS2 Message
AS2 (Applicability Statement 2) is a standard that defines security requirements for sending and receiving EDI over the internet (EDIINT) using certificates and encryption. This sample task demonstrates how AutoMate creates an AS2 message containing an XML file attachment called book.xml, encrypts the message using a certificate native to AS2 and digitally signs the message using a certificate and key. The AS2 message is then transmitted over the internet (EDIINT). |
-
3/28/08 by Phillip PeermanGreat work! I added a couple lines to make it work for me though... After line 27 (FTP dowonload) you need a couple of extra steps: Line 28: Else Line 29: Set variable SetVar to value "0"
<AMELSE><br /> <AMSET VARIABLENAME="SetVar">0</AMSET>
Comments (1)