Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6854011
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T01:34:51+00:00 2026-05-27T01:34:51+00:00

hi does any body know how to download latest folder from FTP. I have

  • 0

hi does any body know how to download latest folder from FTP. I have folders like Evolvenet_20111112.1
Evolvenet_20111113.1
from this i have to download latest folder . Can any one please help me with an example.

Thanks in advance,
Bhasker.


Ftp listing is not working because my build folders were in \build\Evolvenet 2010\ . Listing will take default folder after logging into the ftp server. Is there any way to specify to goto that folder and list.

Thanks,
Bhasker.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T01:34:51+00:00Added an answer on May 27, 2026 at 1:34 am

    I think what you’ll need to do is break it down into steps:

    1. List relevant files with FTP
    2. Extract file names from the listing
    3. Sort the file names
    4. Take the first or last file name from the sorted list
    5. Get that file with FTP

    Since your files are named using a yyyyMMdd.<version> pattern, you can simply sort the files by name to put them in date order.

    Step 1: List the files something like this

    <ftp action="list" 
         server="${server}" userid="${user}" 
         password="${password}" listing="list.txt">
      <fileset>
        <include name="Evolvenet_*"/>
      </fileset>
    </ftp>
    

    Steps 2-4: Extract newest file from the listing

    <loadresource property="newest.file">
      <concat>
        <fileset file="list.txt"/>
      </concat>
      <filterchain>
        <tokenfilter>
          <replaceregex pattern=".*(Evolvenet_.*)" replace="\1"/>
        </tokenfilter>
        <sortfilter reverse="true"/>
        <headfilter lines="1"/>
      </filterchain>
    </loadresource>
    
    <echo message="newest.file ${newest.file}"/>
    

    Step 5: Get that file with FTP

    <ftp action="get"
         server="${server}" userid="${user}"
         password="${password}">
      <fileset dir="download">
        <include name="${newest.file}"/>
      </fileset>
    </ftp>
    

    I have answered as if Evolvenet_* were files, but I notice you say they are directories. I think all that needs to change to download the directory is the include clause in the FTP get:

    <include name="${newest.file}/**"/>
    

    To list the contents of a certain directory (rather than the user’s login directory), using the dir attribute of the fileset to specify the remote directory, e.g.

      <fileset dir="/build/Evolvenet 2010">
        <include name="*"/>
      </fileset>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Does any body know what I have to check if my app freezes? I
Does any body know how to set different select statement for the same cursor?
Does any body know how can I use MS_MPI in my VC++ MFC project?
I'm using this code for download files from a server via FTP. It works
Does anybody know how can I download a website using .NET? Is there any
Does anybody know of any sample databases I could download, preferably in CSV or
Does anybody know why this function, when passed an invalid date (e.g. timestamp) to
Does anybody know how to programmatically disable the keyboard individual letter pop-up? (This blue
does anybody know how to insert code into lyx? just like what is available
I am not able to find an answer to this. Does anybody know this?

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.