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 06-07-2007, 11:59 AM
Matt Matt is offline
Junior Member
 
Join Date: May 2007
Posts: 7
Default Looping through an FTP folder

Has anyone found a way to loop through an FTP folder and only download the files that aren't already in your download directory? I'm currently using the 'FTP: Get all Remote Files In Folder "folderName\download" with criteria "*.*"' but I would prefer to compare each file with what exists in my download directory and only download the files that I don't have. My current task downloads about 100 files everyday when I only need 4 and the number increases by 4 files/day.

Thanks,
Matt
Reply With Quote
  #2 (permalink)  
Old 06-07-2007, 01:10 PM
Mihir Shukla Mihir Shukla is offline
Administrator
 
Join Date: Apr 2007
Posts: 16
Default

This may sounds simple, but can you not delete files from FTP server after you have downloaded them?

This way you only have new files there.
Reply With Quote
  #3 (permalink)  
Old 06-08-2007, 05:15 AM
Matt Matt is offline
Junior Member
 
Join Date: May 2007
Posts: 7
Default

That would be simple, but we don't have rights to delete the files. Our client archives from the folder once the files are 3 months old, but this still leaves 100+ files at all times.
Reply With Quote
  #4 (permalink)  
Old 06-08-2007, 09:41 AM
forumsupport forumsupport is offline
Senior Member
 
Join Date: Apr 2007
Posts: 465
Default

Hello Matt,

In that case, would the following work?

You can download the files in the temporary folder & then you can compare these downloaded files with the files in the local folder. If those files do not exist, then it will copy in that local folder. Once this copy process is over, you can delete downloaded files.

The text format of the task will look like as follows:

FTP: Connect "tethyssolutions.com"
FTP: Get All Remote Files in Folder "temp" with criteria "*.*"
Start Loop “Each File in c:\temp"
If File Does Not Exists ("d:\folder\$FileName$.$Extension$") Then
Copy Files "c:\temp\$FileName$.$Extension$" to "d:\folder\$FileName$.$Extension$"
End If
End Loop
Delete Files "c:\temp"
Reply With Quote
  #5 (permalink)  
Old 06-11-2007, 09:44 AM
Matt Matt is offline
Junior Member
 
Join Date: May 2007
Posts: 7
Default

I think that would work. Thanks for the help!
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:25 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