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