![]() |
| |||||||
Automation Anywhere Post messages and questions related to Automation Software here. |
![]() |
| | LinkBack | Thread Tools | Display Modes |
| |||
|
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 |
| |||
|
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. |
| |||
|
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 |
| |||
|
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 |
| |||
|
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. |
![]() |
| Thread Tools | |
| Display Modes | |
| |