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 05-27-2009, 05:44 PM
Kass Kass is offline
Junior Member
 
Join Date: May 2009
Posts: 6
Default Search for and Copy Specific Text From a Text File, Without Opening it.

I would like to Search for Specific Text within a Text File and copy it to the clipboard, without having to open the text file.

Could some please tell me how to do this.
Kind Regards

K
Reply With Quote
  #2 (permalink)  
Old 05-28-2009, 09:14 AM
forumsupport forumsupport is offline
Senior Member
 
Join Date: Apr 2007
Posts: 1,342
Default

Hello,

You can use 'Read from CSV file' command to get data from text file. Use loop for each row in an SQL Query dataset command to get the text file data in the system variable $Dataset Column$. Inside loop, you can insert condition, If Variable command to check if $Dataset Column$ includes particular text then copy the data into $Clipboard$ using Variable Operation command.

We have attached a sample task for your refernce. To run this task,

. Please copy it under location, 'C:\...\My Documents\Automation Anywhere\Automation Anywhere\My Tasks' folder.
. Copy sample.txt under C:\.

Hope that helps. If you could tell us more about your case, we would be able to help you more with specific task.
Attached Files
File Type: zip Extract.zip (656 Bytes, 10 views)
Reply With Quote
  #3 (permalink)  
Old 05-28-2009, 06:07 PM
Kass Kass is offline
Junior Member
 
Join Date: May 2009
Posts: 6
Default

Your Solution Works!
That's Great Thankyou.

Could I also please ask you to modify the sample .atmn you gave me, so that I can Search for a Specific line of Text within a Text File and (If that text line exists) copy ALL the text in the text file
to the clipboard, again without having to open the text file.

Kind Regards

K
Reply With Quote
  #4 (permalink)  
Old 05-29-2009, 07:09 AM
forumsupport forumsupport is offline
Senior Member
 
Join Date: Apr 2007
Posts: 1,342
Default

Hello Kass,

We have amended the task as per your requirement. Please copy attached .atmn file under location, 'C:\...\My Documents\Automation Anywhere\Automation Anywhere\My Tasks' folder.

Hope that helps.
Attached Files
File Type: atmn extractTextFileData.atmn (769 Bytes, 7 views)
Reply With Quote
  #5 (permalink)  
Old 05-29-2009, 05:35 PM
Kass Kass is offline
Junior Member
 
Join Date: May 2009
Posts: 6
Default

Wow that's great thank you,

Your sample files are terrifically helpful. Can I stretch the friendship once more and ask you to modify the extractTextFileData.atmn so that it searches the sample.txt file for the phrase http:// and if found, deletes it from the file. Again all without opening the file.
Kind Regards,
K
Reply With Quote
  #6 (permalink)  
Old 05-30-2009, 12:16 PM
forumsupport forumsupport is offline
Senior Member
 
Join Date: Apr 2007
Posts: 1,342
Default

Hello Kass,

We have updated the task as per your requirement. Please copy it under location, 'C:\...\My Documents\Automation Anywhere\Automation Anywhere\My Tasks' folder.

Before running this task, you need to create two variables, Temp1 and Temp.
To create variable please follow below mentioned steps,
1. Go to Tools->Variable Manager in Automation Anywhere.
2. Click on “Add New Variable”.
3. From "Type" dropdown, select "Value".
4. In “Name” field, enter “Temp”.
5. In “Value” field enter any value or keep it null.
6. Press “Save”. Press “Ok”
7. Similarly, create variable Temp1.

Hope that helps.
Attached Files
File Type: atmn extractTextFileData.atmn (1.1 KB, 4 views)
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 04:54 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