how to download all files in directory

Posted on 2005-04-10
Last Modified: 2012-08-14
Hi, I have a php app that creates some files on the server. The client would like to be able to download all files in a particular directory to their local machine in just one click.

Is this possible? If it is too difficult, I will just have them use an ftp client. But if there is an easy way to integrate this in their app, that would be better.

Question by:alpineer
    LVL 6

    Accepted Solution

    I think ZIP file is the way to ago, you will find some helpful information in this post:

    Another approach:

    This is in ASP, but might help:

    Or they can use one of these download accelerators which usually have option to download multiple files at once (FlashGet, GetRight, etc...)

    Author Comment

    Thanks. I'm just going to configure an ftp client to make it as easy as possible for them. It doesn't sound like it is worth the trouble to re-invent the wheel.

    Featured Post

    Looking for New Ways to Advertise?

    Engage with tech pros in our community with native advertising, as a Vendor Expert, and more.

    Join & Write a Comment

    Author Note: Since this E-E article was originally written, years ago, formal testing has come into common use in the world of PHP.  PHPUnit ( and similar technologies have enjoyed wide adoption, making it possib…
    Part of the Global Positioning System A geocode ( is the major subset of a GPS coordinate (, the other parts being the altitude and t…
    The viewer will learn how to count occurrences of each item in an array.
    The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …

    734 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    21 Experts available now in Live!

    Get 1:1 Help Now