Call Toll Free: 1-888-484-3535    

 Automation Anywhere - The Automation Software

Sample Tasks -> T02- Rename all files in a folder

Task Description: Loop through all the files in the selected folder and rename files with .xls extension by prefixing it with today’s date.

Solution
1.Create new task
  • Click on Tools->Task Editor.
2.Loop through folder
  • From the commands list select "Conditions / Loops -> Loop” command.
  • In the "Start Loop" wizard, select “Each file in a folder” option and specify the folder name.
  • Save the command.

Screenshot 1

3.Check if .xls extension
  • Select “Conditions / Loops-> If” command.
  • In the “If” wizard, select “Variable” option and select variable “Extension” (Click edit to select a variable).
  • Select “Equal To” operator and enter a fix value “xls”.
  • Save the command.

Screenshot 2

4.Rename the file
  • Select “Programs/Files/Windows->Files/Folders” Command.
  • Select “Rename File(s)” option in “Files/Folder” wizard and enter the path of the folder. Press F2 Key to select Filename, Extension, Day, Month and Year System Variables and enter them as in Screenshot 3 .
  • Save the command.
  • If needed adjust the “Rename File(s)” command between the “If” command using Up/Down buttons on the Toolbar.
 
When you run this task, it loops through all the files in the selected folder and rename files with .xls extension by prefixing it with Today’s date.

This tutorial demonstrates use of one of very useful command wizard, 'Loop through each file in a folder'. Use this when you want to perform actions on some or all files in a folder. This command makes it much easier because you don't need to know how many files there are in advance. In addition this tutorial demonstrates conditional commands, file related commands and ability to use system date and time variables.

Screenshot 1:

Screenshot 2:

Screenshot 3:

Screenshot 4:

 

E-Mail: Enter your email address to receive information about new products & offers from Tethys Solutions.


 PRODUCTS

 Automation Anywhere
   Standard & Premier
   Enterprise
   Integration Pack
 Workspace Macro Pro
 Workspace Macro
 Launch-n-Go
 Free Downloads
 Compare Products
 

 SERVICES

 Ask The Expert
 Consulting Service
 

 PURCHASE

 BUY NOW
 Pricing
 Upgrades
 Our Guarantee

 CUSTOMERS

 Customer List
 Case Studies
 Testimonies

 SUPPORT

 FAQ & Examples
 Have a Question?
 Open A Support Case
 Forums
 

 QUICK LINKS

 Productivity Essentials
 Developers
 

 GENERAL

 Partners
 Affiliates
 Articles: Macro &
 Automation

 Get RSS Feeds

 Press & News
 Contact Us
Home |Site Map |Privacy Policy |About Us |Contact Us

Copyright © 2003-2008 Tethys Solutions, LLC. All rights reserved. Trademarks