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 10-29-2007, 02:19 PM
DavidPantoja DavidPantoja is offline
Junior Member
 
Join Date: Oct 2007
Location: Glendale, CA
Posts: 4
Default Windows Confirmation Window

Sorry if this is to basic of a question, but I'm new to the wonderful world of automation software and I have encountered a situation that I don't know the cure. I am trying to rename all the files in a folder to a different extension, but when the task encounters a read-only file then the task pauses for the windows confirmation window to be satisfied. I tried an "If Window exists" condition but the software just doesn't process. Perhaps there is a way to first change all the files to NOT Read Only first, or what am I missing here.

1 Start Loop " Each File in C:\PDF"
2 Rename Files "C:\PDF\$FileName$.$Extension$" to "$FileName$.pdf"
3 If Window Exists("Confirm File Rename") Then
4 Mouse Click: Left Button on '&Yes' in "Confirm File Rename"
5 End If
6 End Loop
Reply With Quote
  #2 (permalink)  
Old 10-31-2007, 10:41 PM
forumsupport forumsupport is offline
Senior Member
 
Join Date: Apr 2007
Posts: 524
Default

Hello,

Actually, the confirmation window for file rename would appear every time when you try to rename a read-only file. So, what we suggest is, if security is not the measure then change the file attribute (disable Read-only option). Before renaming all the files in a folder, insert the keystrokes for deselecting Read-only attribute and then using ‘Loop for each file in a Folder’ command rename all the files in loop.


The text format of your task will look something like this:


1) Prompt For Folder: "Please select the folder" for Folder Assign to variable "$Prompt-Assignment$"

2) Open "cmd.exe "

3) Delay: (250 ms)

4) Keystrokes: attrib -r $Prompt-Assignment$\*.* in "C:\WINDOWS\system32\cmd.exe"

5) Delay: (250 ms)

6) Keystrokes: [ENTER] in "C:\WINDOWS\system32\cmd.exe"

7) Delay: (250 ms)

8) Start Loop " Each File in $Prompt-Assignment$"

9) Rename Files "$CurrentDirectory$\$FileName$.$Extension$" to "$FileName$.txt"

10) End Loop

This task will first ask you for folder whose files you want to rename. Then from command line (using Attrib command), it will deselect ‘Read-Only’ attribute of all the files in specified folder. After that, it will rename all the files in specified folder.

We have also attached task file (CheckReadOnlyStatus.atmn) for your convenience. Copy it under location: My Documents\Automation Anywhere\Automation Anywhere\My Tasks\.

Hope that helps.
Attached Files
File Type: atmn CheckReadOnlyStatus.atmn (4.0 KB, 1 views)
Reply With Quote
  #3 (permalink)  
Old 11-14-2007, 11:25 AM
DavidPantoja DavidPantoja is offline
Junior Member
 
Join Date: Oct 2007
Location: Glendale, CA
Posts: 4
Default

Sometimes the easiest ways are so obvious that they are overlooked in favor in trying to make it more wiz-bang. Thanks for the tip, it worked perfectly.
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 05:37 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