Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Download all files with one click

Posted on 2014-01-09
7
Medium Priority
?
666 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 1000 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 1000 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
Plesk WordPress Toolkit

Plesk's WordPress Toolkit allows server administrators, resellers and customers to manage their WordPress instances, enabling a variety of development workflows for WordPress admins of all skill levels, from beginners to pros.

See why 2/3 of Plesk servers use it.

 
LVL 33

Assisted Solution

by:Big Monty
Big Monty earned 1000 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 1000 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

[Webinar] Lessons on Recovering from Petya

Skyport is working hard to help customers recover from recent attacks, like the Petya worm. This work has brought to light some important lessons. New malware attacks like this can take down your entire environment. Learn from others mistakes on how to prevent Petya like worms.

Question has a verified solution.

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

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…
When it comes to security, close monitoring is a must. According to WhiteHat Security annual report, a substantial number of all web applications are vulnerable always. Monitis offers a new product - fully-featured Website security monitoring and pr…
The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…
The viewer will get a basic understanding of what section 508 compliance can entail, learn about skip navigation links, alt text, transcripts, and font size controls.

670 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