Intelligent Automation & Macro Software  

Go Back   Tethys Solutions 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 06-27-2007, 09:13 AM
spope spope is offline
Junior Member
 
Join Date: Jun 2007
Posts: 2
Default Opening the trigger file

My macro is designed to start when any file is added to folder x. My problem is that my macro needs to open the newly added file. The name will be different every time but it usually labeled in the format NDxxxxxx-xx-xxx (where x's are numbers). I can't figure this out...Is the file name a variable? If it is how do I make that work?

By opening the file in it's application, I can gather the numbers that I need and save them in a notebook format through my macro. Right now my macro is just opening the same file every time. I thought I might do it through windows explorer by sorting by the newest files in the folder by when they were created but it seems kind of sketchy.

It seems like this would be a common problem. I saw the thread by TheBrain but he doesn't say how he opens his file, only how it is triggered by creating a new file.

Thanks,
spope
Reply With Quote
  #2 (permalink)  
Old 06-28-2007, 12:14 PM
rparmani rparmani is offline
Administrator
 
Join Date: Jan 2007
Posts: 9
Default

Hello,

To trigger a task when a file, say a text file is created in a particular folder and to open that text file that is created, do as follows:

* Create 3 folders, say temp, temp_2 and final.
* Set the trigger on Temp folder i.e to run a task when new file is created in this folder. Keep this folder empty.
* Now, to open the newly created file what you can do is use 'Copy file(s)' command and copy c:\temp\*.txt to c:\temp_2
* Before copying file from temp to temp_2 empty the folder by using 'Delete File(s)' command and delete c:\temp_2\*.txt
* Copy c:\temp\*.txt to c:\final . The final folder will contain all the files created in temp folder(which will be emptied after file is created)
* Use 'Delete File(s)' command and delete c:\temp\*.txt after file is copied to temp_2 and final folders
* Now, rename the file in temp_2 folder. This is because we have to open the file and we need to know its name, so rename c:\temp_2\*.txt to test.txt (for e.g)
* Using 'Open Program\files' command open c:\temp_2\test.txt

This way you can open the newly created file in a particular folder. All the files created will be copied to Final folder.

The task would look something like as follows:

1 Delete Files "c:\temp_2\*.txt"
2 Copy Files "c:\temp\*.txt" to "C:\temp_2"
3 Copy Files "c:\temp\*.txt" to "C:\Final\"
4 Delete Files "c:\temp\*.txt"
5 Rename Files "c:\temp_2\*.txt" to "Test.txt"
6 Open "c:\temp_2\test.txt "

Please find the attached zip file including the sample task file(.atmn)
Attached Files
File Type: zip Open_File_created.zip (340 Bytes, 2 views)
Reply With Quote
  #3 (permalink)  
Old 08-08-2007, 08:40 AM
spope spope is offline
Junior Member
 
Join Date: Jun 2007
Posts: 2
Default

Thank you- that was very clever
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

vB 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 08:59 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.0.0 ©2007, Crawlability, Inc.
Copyright © 2003-2008 Tethys Solutions, LLC. All rights reserved