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 06-15-2010, 04:47 AM
trentonponder trentonponder is offline
Senior Member
 
Join Date: Jan 2009
Posts: 102
Default Renaming file loop doesn't work

Here is my task

Loop through each file in a folder
Rename FullPath\$FileName$.pdf to $FileName$_01.pdf
End Loop

The task completes with no errors, but nothing is renamed! I have full permissions to this particular folder and can easily rename the files manually.

Any ideas?
Reply With Quote
  #2 (permalink)  
Old 06-15-2010, 08:46 AM
forumsupport forumsupport is offline
Senior Member
 
Join Date: Apr 2007
Posts: 1,342
Default

Hello,

Try using system variable, $CurrentDirectory$ instead of defining the full path. $CurrentDirectory$ would contain the exact path define in 'Loop for each file in a folder'. Text format of task would appear as follows,


Start Loop " Each File in C:\Temp\Temp1"
If $Extension$ Equal To "pdf" Then
Rename Files "$CurrentDirectory$\$FileName$.$Extension$" to "$FileName$_01.$Extension$"
End If
End Loop


Also, attached is the task for your reference.
Attached Files
File Type: atmn sample.atmn (503 Bytes, 0 views)
Reply With Quote
  #3 (permalink)  
Old 06-15-2010, 02:48 PM
trentonponder trentonponder is offline
Senior Member
 
Join Date: Jan 2009
Posts: 102
Default

Quote:
Originally Posted by forumsupport View Post
Hello,

Try using system variable, $CurrentDirectory$ instead of defining the full path. $CurrentDirectory$ would contain the exact path define in 'Loop for each file in a folder'. Text format of task would appear as follows,


Start Loop " Each File in C:\Temp\Temp1"
If $Extension$ Equal To "pdf" Then
Rename Files "$CurrentDirectory$\$FileName$.$Extension$" to "$FileName$_01.$Extension$"
End If
End Loop


Also, attached is the task for your reference.
I tried as you suggested and it still didn't work. The weird part is that its not generating any errors.
Reply With Quote
  #4 (permalink)  
Old 06-15-2010, 04:05 PM
forumsupport forumsupport is offline
Senior Member
 
Join Date: Apr 2007
Posts: 1,342
Default

Hello,

This is really strange, we would like to see this actually. Can you please provide your contact number and best time of contact by opening the support case so we can see and resolve the issue quickly?

Automation Anywhere - Open A Support Case
Reply With Quote
  #5 (permalink)  
Old 04-18-2011, 10:21 AM
pattybal pattybal is online now
Junior Member
 
Join Date: Jul 2010
Posts: 16
Unhappy

I have the same problem and I am using AA 6.1 Premier Legacy. Did you find the cause and how to solve it?
Reply With Quote
  #6 (permalink)  
Old 04-18-2011, 02:15 PM
forumstaff forumstaff is offline
Senior Member
 
Join Date: Oct 2010
Posts: 521
Default

Hello Pattybal,

As we want to see the behavior of that task at our end, we want you to send us the task at support@automationanywhere.com so that we will be able to guide you with proper solutions.

Please let us know.

Thanks & Regards
Reply With Quote
  #7 (permalink)  
Old 04-20-2011, 02:51 PM
pattybal pattybal is online now
Junior Member
 
Join Date: Jul 2010
Posts: 16
Default

If the renamed file is on the local computer, it works fine.
If the renamed file is on a network mapped drive, the command is ignored.
The renamed file also needs the path and then it works.

Does it supposed to work like that?
The examples do not ask you for the path.
Reply With Quote
  #8 (permalink)  
Old 04-21-2011, 02:31 PM
forumstaff forumstaff is offline
Senior Member
 
Join Date: Oct 2010
Posts: 521
Default

Hello Pattybal,

We apologize for the inconvenience. If the file that has to be renamed is on the network drive then you will have to specify the path to those files but if it is in the local drive then you don't have to type in the whole path as it gets easily accessible.

The examples related to this requirement are stated for the local drive though we will make sure to describe the examples precisely.

Thanks & Regards
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 07:27 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