Intelligent Automation & Macro Software  

Go Back   Automation Anywhere, Inc. Forums > Products Zone > Automation Anywhere
Register FAQ Search Today's Posts Mark Forums Read

Automation Anywhere Post messages and questions related to Automation Software here.


Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 01-23-2008, 10:35 AM
DavidPantoja DavidPantoja is offline
Junior Member
 
Join Date: Oct 2007
Location: Glendale, CA
Posts: 4
Default Yesterday

I know this must be easy do do, but how do you get it to copy files that were created yesterday and yesterday only? I would like to put a variable in the between fields but it wants valid dates only.

Last edited by DavidPantoja; 01-23-2008 at 10:57 AM.
Reply With Quote
  #2 (permalink)  
Old 01-24-2008, 01:58 AM
forumsupport forumsupport is offline
Senior Member
 
Join Date: Apr 2007
Posts: 1,342
Default

Hello David,

Using Automation Anywhere 4.0, you can copy files created yesterday. There are two ways to accomplish this task; you can use any one of them that suits your requirement best.

First way is, select 'Copy Files' option of Files/Folder command, specify 'Source Files' and 'Destination Folder' as per your requirement, click on 'Advanced View' button, from 'Select Date' drop down choose 'Create Date', select option 'in last' and in 'Days' textbox specify 1. The text format of command would appear something like this:

Copy Files "C:\Temp\*.*" to "C:\YesterdazFiles" if file is created in last 1 days

Second way is, use 'Loop for each file in a folder' option of Loop command, inside loop insert condition, 'If Date' i.e. if create date of file is in last one day then copy that file using 'Copy File' command (see attached screenshot).

About Loop For Each file in a folder command: If you want to perform some actions for all files in a folder, use this command. Often number of files in a folder can change. You can specify a folder and this loop will run for as many times as there are number of files in that folder. You can get the name of the file by using the System Variable $FileName$. Similarly to get the extension of the file you can use $Extension$ System variable and to get the path of the folder under which this file resides use the System Variable $CurrentDirectory$. All these system variables will return empty value when used out side this looping command.

Following is the text format of task,

1) Start Loop " Each File in C:\Temp"
2) If File date ("$CurrentDirectory$\$FileName$.$Extension$" created date is in last 1 days) Then
3) Copy Files "$CurrentDirectory$\$FileName$.$Extension$" to "C:\YesterdazFiles\"
4) End If
5) End Loop

We have created task (CopyFilesCreatedinLast1day.atmn) for your convenience. Copy it under location, 'C:\...\My Documents\Automation Anywhere\Automation Anywhere\My Tasks' folder.

Before running this task, edit this task to change source folder in 'Loop for each file in a folder' command (Line No. 1) and 'Destination Folder' in 'Copy File' command (Line No. 3) as per your requirement.

Hope that helps.
Attached Images
File Type: jpg CopyFilesCommand.jpg (14.2 KB, 1 views)
Attached Files
File Type: atmn CopyFilesCreatedinLast1day.atmn (324 Bytes, 0 views)
Reply With Quote
  #3 (permalink)  
Old 01-24-2008, 11:35 AM
DavidPantoja DavidPantoja is offline
Junior Member
 
Join Date: Oct 2007
Location: Glendale, CA
Posts: 4
Default

The problem with both of those solutions is that it also copies yesterday and todays files. I can try copying both days to a folder with the last 1 day parameter, then delete todays files with the last 0 day parameter from the copied files. But what is really needed is the ability to use variables in the date fields.
Reply With Quote
  #4 (permalink)  
Old 01-25-2008, 10:05 AM
forumsupport forumsupport is offline
Senior Member
 
Join Date: Apr 2007
Posts: 1,342
Default

Hello,

We have forwarded your requirement to the product development team for the future version of Automation Anywhere.
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -7. The time now is 01:42 PM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.0.0 ©2007, Crawlability, Inc.
Copyright © 2003-2011 Automation Anywhere, Inc. All rights reserved