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-06-2008, 03:35 PM
AANewbie AANewbie is offline
Junior Member
 
Join Date: Jun 2008
Posts: 5
Default Copying folders and entire contents

Currently using Automation Anywhere v.3.5.1

I CAN create a task to download a folder and it's contents from a network drive to my PC. HOWEVER, I'm unable to create a task that checks for latest sub-folder and download it to my PC... here's the scenario:

A new folder is added to a "main\" directory daily "..\main\foldername###\" where the ### represents the part of the folder-name that consistently changes.

I would like to setup a task to detect that a new folder has been added to ..\main\ and then proceed to download that new folder and it's entire contents to a folder on my PC.

Any suggestions???
Reply With Quote
  #2 (permalink)  
Old 06-07-2008, 02:41 AM
forumsupport forumsupport is offline
Senior Member
 
Join Date: Apr 2007
Posts: 1,342
Default

Hello,

What you can do is, insert 'Copy Folder' command to copy folder that is created in last one day in specified folder lets say, \\main. 'Advanced View' button of 'Copy Folder' command lets you perform the operations on files and folders based on their size and created/modified date. Lets say the changing part of file name is, Foldername$Day$$Month$$Year$ so the text format of command would appear as follows,

Copy Folder "\\main\Foldername$Day$$Month$$Year$ " to "C:\NewFolder\" if folder is created in last 0 days

Save this task and create 'Folder' trigger for this task to run this task automatically whenever any folder is created under \\main folder.

To create folder trigger for task,
. Select your task from Task List and click on 'Trigger' tab found under Properties window.
. Select the Type as Folder.
. Click on '...' button next to Folder Name and select your Folder to monitor i.e. "\\main " .
. From the Action, select 'When folder is created ' & save the trigger.
. Every time Foldername$Day$$Month$$Year$ folder is created under \\main folder, it will launch your task and copy that folder contents at specified location.

Hope that helps.
Reply With Quote
  #3 (permalink)  
Old 06-09-2008, 08:58 AM
AANewbie AANewbie is offline
Junior Member
 
Join Date: Jun 2008
Posts: 5
Default

Thanks for the help. I'm still unable to get this to work properly.

The folder naming on the network drive contains a version number that changes on a daily basis.... for example \\main\5.0a1, \\main\5.0b1, \\main\5.0r1, etc, etc...

I would like the script to detect the most recently posted \\main\sub-folder and copy that folder and it's contents to my local PC regardless of folder naming convention.

Is this possible, or is it a limitation of automation anywhere?

Thanks

Last edited by AANewbie; 06-09-2008 at 03:22 PM.
Reply With Quote
  #4 (permalink)  
Old 06-10-2008, 03:00 AM
forumsupport forumsupport is offline
Senior Member
 
Join Date: Apr 2007
Posts: 1,342
Default

Hello,

In that case, you can make use of 'Loop for each folder in a folder' command. To access the folder name within the loop use the System Variable, $FolderName$. Inside loop, insert 'Copy Folder' command to copy folder that is created in last 0 day. If required, you can also put condition, that folder name should include static word, '5.0'.

1) Start Loop " Each Folder in \\Main\"
2) If $FolderName$ Includes "5.0" Then
3) Copy Folder "\\Main\$FolderName$" to "C:\" if folder is created in last 0 days
4) End If
5) End Loop

You can create Folder trigger on task, 'When Folder is created' under \\Main folder. In that way, whenever a new folder would be created under \\Main this task would be fired.

For your convenience, we have attached .atmn file. Please copy it under location, 'C:\...\My Documents\Automation Anywhere\Automation Anywhere\My Tasks' folder.

Hope that helps.
Attached Files
File Type: atmn CopyFolder.atmn (264 Bytes, 7 views)
Reply With Quote
  #5 (permalink)  
Old 06-11-2008, 08:34 AM
AANewbie AANewbie is offline
Junior Member
 
Join Date: Jun 2008
Posts: 5
Default

Still not working...

I followed along with the example provided and created the following script by selecting Automation Anywhere 3.5.1 Commands within the Edit Task-Task Actions List:

Start Loop "Each Folder in \\main\"
If Folder Exists("$FolderName$ Includes "5.0"") Then
Copy Folder "\\main\$FolderName$" to "C:\destination\" if folder is created in last 0 days
End If
End Loop

I even mapped \\main to Z:\ and it failed even though status states it completed... the folder that I created today along with it's contents were not copied to my local machine.

Any ideas why this simple script isn't working?

Thanks!

Last edited by AANewbie; 06-11-2008 at 07:57 PM.
Reply With Quote
  #6 (permalink)  
Old 06-12-2008, 02:28 AM
forumsupport forumsupport is offline
Senior Member
 
Join Date: Apr 2007
Posts: 1,342
Default

Hello,

Could you please tell us, do you have have full control access to \\main?
Reply With Quote
  #7 (permalink)  
Old 06-25-2008, 11:50 AM
AANewbie AANewbie is offline
Junior Member
 
Join Date: Jun 2008
Posts: 5
Default

Yes, I do have full access to \\main\ outside of automation anywhere.... this is a networked file server directory that I can successfully map to drive Z:\

IF I'm required to re-enter my username/password for \\main, how would that be accomplished within the Automation Anywhere script? I'm currently not being prompted to enter this info when the script runs.

Thanks.
Reply With Quote
  #8 (permalink)  
Old 06-26-2008, 02:58 AM
forumsupport forumsupport is offline
Senior Member
 
Join Date: Apr 2007
Posts: 1,342
Default

Hello,

Can you please try this, login with Administrator account and run the task from admin account?

Hope that helps.
Reply With Quote
  #9 (permalink)  
Old 06-26-2008, 08:54 AM
AANewbie AANewbie is offline
Junior Member
 
Join Date: Jun 2008
Posts: 5
Default

Hi,

I am running Automation Anywhere on a user profile with full admin rights... I have full access to the \\main folder whether or not it is mapped as a drive.

How can I push my username and password through the automation anywhere script to log in and gain access to \\main\ if I'm not pointing to a mapped drive?

Thanks.
Reply With Quote
  #10 (permalink)  
Old 07-01-2008, 02:16 AM
forumsupport forumsupport is offline
Senior Member
 
Join Date: Apr 2007
Posts: 1,342
Default

Hello,

You can insert Keystrokes commands to access that particular machine (\\main) through Start->Run and can provide Username and password before you copy file from it.

Can you please email us your contact number at http://www.tethyssolutions.com/ask-the-expert.htm and one of our Automation experts will get in touch with you to help you resolve the problem?
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 08:23 AM.


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