# FTP question

**URL:** <https://www.finalbuilder.com/forums/t/ftp-question/4513>\
**Category:** Discussion\
**Created:** [April 25, 2012, 3:25am UTC](https://www.finalbuilder.com/forums/t/ftp-question/4513 "2012-04-25T03:25:32Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![deleted\_user](https://www.finalbuilder.com/forums/user_avatar/www.finalbuilder.com/deleted_user/32/937_2.png) [@deleted\_user](https://www.finalbuilder.com/forums/u/deleted_user)\
**Post date:** [April 25, 2012, 3:25am UTC](https://www.finalbuilder.com/forums/t/ftp-question/4513/1 "2012-04-25T03:25:32Z")

</div>

Hello all,

I am new to Automise so this may&nbsp;have a simple answer:

We connect to an FTP site (read-only) and the&nbsp;data is provided to is in the format: FRED\_MMDDYY.CSV

So the files in the FTP directory look like:

FRED\_042212.CSV

FRED\_042112.CSV

I want to download only the latest file.&nbsp; Is there a way to do this? Or should I try to get read/write access and script a deletion after the file is downloaded?

Thanks

---

<div class="post-metadata">

**Author:** ![deleted\_user](https://www.finalbuilder.com/forums/user_avatar/www.finalbuilder.com/deleted_user/32/937_2.png) [@deleted\_user](https://www.finalbuilder.com/forums/u/deleted_user)\
**Post date:** [April 25, 2012, 3:27am UTC](https://www.finalbuilder.com/forums/t/ftp-question/4513/2 "2012-04-25T03:27:32Z")

</div>

&nbsp;

Forgot to mention, the file may not be FRED\_%TODAY%.CSV it might be days or weeks old.

---

<div class="post-metadata">

**Author:** ![Vincent](https://www.finalbuilder.com/forums/user_avatar/www.finalbuilder.com/vincent/32/938_2.png) [@Vincent](https://www.finalbuilder.com/forums/u/Vincent)\
**Post date:** [April 27, 2012, 3:49am UTC](https://www.finalbuilder.com/forums/t/ftp-question/4513/3 "2012-04-27T03:49:07Z")

</div>

FTP is not real good at this sort of thing.   
  
 One way might be to start with today’s date and try to get it, and loop backwards x number of days till you find one.   
  
 or   
  
 Use the List directory action and use some script to parse the output (a lot more work)   
  
 or   
  
 Use the FTP mirror action, it works well with most FTP servers.

---

<div class="post-metadata">

**Author:** ![deleted\_user](https://www.finalbuilder.com/forums/user_avatar/www.finalbuilder.com/deleted_user/32/937_2.png) [@deleted\_user](https://www.finalbuilder.com/forums/u/deleted_user)\
**Post date:** [May 2, 2012, 3:42am UTC](https://www.finalbuilder.com/forums/t/ftp-question/4513/4 "2012-05-02T03:42:13Z")

</div>

Thanks Vincent, good to know I wasn’t missing anything obvious. Thanks for the reply.
