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 09-06-2007, 07:40 PM
philkryder philkryder is offline
Member
 
Join Date: Sep 2007
Posts: 73
Default How do I download ALL files in an ASP folder

I want to download some files from a web page.

But, the number of folders and there names vary.

Also, the number of files in each folder varies.

How do I dynamically determine the number and names of the folders and the files within them to download.

The files and folders show up as "controls" and I can record the actions easily.
I just want to dynamically vary the controls and file names.

Thanks!
Phil
Reply With Quote
  #2 (permalink)  
Old 09-07-2007, 01:32 PM
forumsupport forumsupport is offline
Senior Member
 
Join Date: Apr 2007
Posts: 486
Default

Hello,

You can use ‘Loop For Each file in a folder’ and ‘Loop For Each folder in a folder’ command in two separate task. Let us say task1 contain ‘Loop For Each folder in a folder’ command and task2 contain ‘Loop For Each file in a folder’ command.

If you want to perform some actions for all files in a folder, use ‘Loop For Each file in a folder’ command. Often number of files in a folder can change. You can specify a folder and this loop will run for as many times as there are number of files in that folder. You can get the name of the file by using the System Variable $FileName$. Similarly to get the extension of the file you can use $Extension$ System variable and to get the path of the folder under which this file resides use the System Variable $CurrentDirectory$. All these system variables will return empty value when used out side this looping command.

Loop For Each folder in a folder command is similar to Loop for each file in a folder, except it loops for folders, not files. To access the folder name within the loop use the System Variable, $FolderName$.

Now, you can run task2 from task1, within Loop For Each folder in a folder command, using ‘Run Task’ command. Assign value of variable "$FolderName$" to Clipboard so that we can use it in task2 for downloading each file in current folder.



The text format of task1 will look something like this:

1) Start Loop " Each Folder in http:\www... \FolderName " //Give Folder Path

2) Assign value of variable "$FolderName$"to Clipboard

3) Run Task "C:\Documents and Settings\ My Documents\Automation Anywhere\Automation Anywhere\My Tasks\ task2.atmn"

4) End Loop


The text format of task2 will look something like this:

1) Start Loop " Each File in http:\www... \FolderName\$Clipboard$"

2) Download file 'C: \ DownloadFolder\$FileName$' from 'http://www….'

3) End Loop


Hope that helps.
Reply With Quote
  #3 (permalink)  
Old 09-10-2007, 07:02 PM
philkryder philkryder is offline
Member
 
Join Date: Sep 2007
Posts: 73
Default

The code you supplied seems to imply a folder that I can access via drive letter or URL.
I cannot do that with these files and folders.

I don't have access to the "folder" on the remote web server.

I can only access these as dynamically built ASP pages that list the files and folders as controls.
Reply With Quote
  #4 (permalink)  
Old 09-17-2007, 04:14 PM
philkryder philkryder is offline
Member
 
Join Date: Sep 2007
Posts: 73
Default

Here is what one row of the web page looks like.
It is dynamically built depending on the number of files in the folder.

How can I dynamically build code to download an arbitrary number of these files?

https://counties.gov/CPQ/download.as...5Freview%2ECSV
Reply With Quote
  #5 (permalink)  
Old 09-19-2007, 11:07 AM
forumsupport forumsupport is offline
Senior Member
 
Join Date: Apr 2007
Posts: 486
Default Re: How do I download ALL files in an ASP folder

Hello,

We are not able to open the link that you have sent. Can you please send it again?
Reply With Quote
  #6 (permalink)  
Old 09-20-2007, 01:00 PM
philkryder philkryder is offline
Member
 
Join Date: Sep 2007
Posts: 73
Default

I cannot allow you access to the web site - it is sensitive data.

Can I send you source from the site?

I don't want to post it, but I can send you text.
Phil
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 04:56 PM.


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