Solved

Download all files with one click

Posted on 2014-01-09
7
633 Views
Last Modified: 2014-01-18
I have a button that allows me to download a file. the links come from a recordset which holds the path to the file and the names of the files.

Is there a way to download ALL files with one button ?   Instead of having multiple buttons one for each file ?

I am using classic ASP/VB
0
Comment
Question by:amucinobluedot
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
  • 2
7 Comments
 
LVL 53

Assisted Solution

by:Scott Fell, EE MVE
Scott Fell,  EE MVE earned 250 total points
ID: 39769725
You would probably want to have the files zipped up first then download.  

If you are using file system object you can loop through and send the files one at a time but too many too fast may not be good.  Can you post the code you are using now?
0
 
LVL 33

Assisted Solution

by:Big Monty
Big Monty earned 250 total points
ID: 39771237
it would be bad practice to even attempt to download multiple files at once, as this would be considered a security breach. Even if you have good intentions, this type of functionality would be considered malicious. I know if I went to a web page and clicked a link and multiple files started showing up on my hard drive, I'd be a little freaked out!

You have 2 options, either have them all zipped up in one file like Scott suggested, and have the user use 1 link, or have all of the files and have the user manually initiate each download.
0
 

Author Comment

by:amucinobluedot
ID: 39771395
Here is the scenario.

This is in a secure intranet. User uploads a copy of someone's birth certificate, a week later they upload a copy of their passport, a month later the driver's license and so on.
A year later they end up with say 15 documents, at this point they want to download all of them. They are not zipped because they were uploaded in the course of a full year and downloading one at the time takes a lot of time.
This is why they are asking me if there is a way to add an option to download all the documents in the person's file.
I have a recordset with the path to the folder were the files are stored and also a recordset with the file names (loops as they are multiple files).

I hope that clarifies why the options listed above are not feasible.
0
WordPress Tutorial 2: Terminology

An important part of learning any new piece of software is understanding the terminology it uses. Thankfully WordPress uses fairly simple names for everything that make it easy to start using the software.

 
LVL 33

Assisted Solution

by:Big Monty
Big Monty earned 250 total points
ID: 39771425
with this scenario, I would just zip the files on the fly. Create a link on your page:

<a href="page.asp?files=all">get all files</a>

and use the following tutorial to learn how to zip the files up. I recommend the gzip option if you have access to install it on your server

http://www.4guysfromrolla.com/webtech/030800-1.shtml
0
 
LVL 53

Accepted Solution

by:
Scott Fell,  EE MVE earned 250 total points
ID: 39771515
Another option is to store the items in your database.  First convert to base64 then encrypt.  Now those confidential items can't be viewed by accident by the wrong people as they are not a drive and you can generate whatever output you need on the fly.  But this would require a one time script to convert.  

If you don't have the classic asp components for this, I have just created what I needed as a webservice in php as a funciton.  Then post the php and output my base64, encrypted code back to my asp page.
0
 

Author Comment

by:amucinobluedot
ID: 39771882
Thanks. Storing the files in the database is not an option, its a 10 yr old system and all files are in a folder into which all new files are also uploaded.
We would need to zip on the fly as you mentioned so that then they can be downloaded.
I will look into that. And yes, I have a dedicated server with full access to install anything in it.
0
 

Author Closing Comment

by:amucinobluedot
ID: 39791362
NA
0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article was originally published on Monitis Blog, you can check it here . Today it’s fairly well known that high-performing websites and applications bring in more visitors, higher SEO, and ultimately more sales. By the same token, downtime…
Although a lot of people devote their energy toward marketing for specific industries, there are some basic principles that can be applied to any sector imaginable. We’ll look at four steps to take and examine how those steps were put into action fo…
This video teaches users how to migrate an existing Wordpress website to a new domain.
Any person in technology especially those working for big companies should at least know about the basics of web accessibility. Believe it or not there are even laws in place that require businesses to provide such means for the disabled and aging p…

636 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