We help IT Professionals succeed at work.

How send multiple files to clients computer?

erot asked
Medium Priority
Last Modified: 2012-05-04
Using FrontPage98, Access, and ASP.
Prefer answer in VBScript..if not possible then something

This is about delivering image-files over Internet.
The client have selected one or more images to download to his own computer (from the webserver).

When the client hit the submit-button in the ORDER-form, I
want that ALL the selected images shall be sent to one specific directory on the client's computer.
The images that the client ordered are stored in a commaseparated session-variable (with all the unique image-ID's). So when the Client hit the submit-button I want to activate code in an ASP-page, find all the related records in the Access DB, get the image-path for each Image, and
send each Image-file to the directory on the client's computer. The files must be sent one by one. And I have to be sure that each file did reach the destination.

This seems to be a lot....but...
I only want the syntax of the code that get the downloading
of the files done, and eventually the error-handling code.
IMPORTANT...The user shall only click once to start downloading of all the files.

Depending of the work ..this question might be upgraded to
more points. Good luck.

Watch Question

If you send an image to a browser, and you use gif or jpg, the images will not be downloaded to a directory, but will be displayed in the browser (and stored in the browser's cache).

If you want the selected images to be downloaded in one run, I guess your best best is to create on the fly a zip file with the selected images and send that zip file.

In fact you are dealing with 2 things:
1. a server-side problem of sending the selected images, which is not so hard to solve, especially because you control the server and can install what you want on the server.
2. a client-side problem of receiving and storing the images. This is much harder to solve, because you don't have access to the client's computer.

I suggest that you treat those problems seperately, because they each need a different approach. It is imaginable that you will end up using java or ActiveX at the client side, or make use of another protocol then the HTTP (maybe FTP).

There is a server side component called ServerZip from Stonebroom Computers that will take the selections of a user, zip them into one zip file nad then send the images..  You can get a trial version from www.stonebroom.com or from www.wrox.com (look for the book Professional Active Server Pages 2.0 --> example code).

This looks like your best alternative.


The files that shall be downloaded are already compressed.
I MUST send the files ONE by ONE, and be able to check if the
files did download or not.
The files shall not be viewed in the client browser, but shall
be saved directly into a folder on the client computer.
The client shall choose which directory to download to, so
there will be no need to create new directories.
The ServerZIP are not available any more...from WROX...but can it solve the above problem.



The ServerZip is not available anymore due to a bug/problem. !

Is there any other way to solve the problem....and please read
my previous comment regarding my question.



Comment to Sybe's answer...
  Do you have any example code for pnt 1 and 2 in your answer?



To sybe: Same as above...???!???!?!?!?!?

Ok, but first reject MasseyM's answer, and reopen the question.


The solution/object (serverZip) is not available any more.

I didn't catch if you wanted pre-made packages of pictures, or that the users select a number of pictures.. in any case, what you need is a page that does this :

<meta http-equiv="refresh" content="0; url=http://yoursite.foo/file.zip>

You need one for each file, ofcourse. This will cause sensible browser to start downloading it.
One more thing you should do is to have the browser open another window for that.. it's called window.open, but I don't remember the syntax. anyway, the rest should be easy.. :)




To buzh...Sorry about the last comment!!! When I logged in
I did only see a comment from you telling "Text above", which
did'nt make any sense.
When I looked over the history I saw something quite different
answer from you....but do you have any example code, and
when the user starts the downloading he only clicks a submit-button. I want the code on the server to send the image-files, one by one and verifying each download (did the file actually download or not).


Well.. what you need is an asp/cgi/java/whateveryouprefer app that does it server-side. I'm not able to test any code I may produce right now, but what you need to do is this :
- make a <form> that has the user select what files to get.
then you need a script that..
- grabs the options of the form. (they're sent as paramters like this, ?name=value after whatever you put in <form action=
- generates html. this isn't as hard as it sounds.
- the html must open a separate browser window with the window.open function and the code I mentioned earlier

That should solve it. Sorry there's no more specific code, tho.


comments to buzh.
  As mentioned earlier I do not want to send any information
  about what files to download to the client machine. Which means
  I want it to work like this:
  a) the user click the submit-button.
  b) the submit-button is connected to an ASP-page with the
     'POST' option.
  c) the code in the ASP-page will know from a server-variable
     what images the client shall download.
     The code scans through an Access table (ODBC) and get
     each image's full path on the server.
  d) start to download an image to the client's machine. This
     could be on the following folder on the client: 'C:\temp'.
  e) check if the download went OK. If it did repeat point d) and
     e) untill there are no more images to download.

  What I'm interested in is how to solve point d) and e).
  Is this possible??? ...and if ...example code please.
  (is it possible to start the download process from the server?)

If there is example code to come...the points will be upgraded...


No, you cannot do this..
The only thing you can do is generate html to have the client do things automagically, like the http-equiv thing I mentioned. You cannot tell the client to do anything, it has to do it by itself.
What I suggest you do to solve problem d and e, is :
- Generate a list of the files to be sent and use the window.open/http-equiv to have the client download the file.
- Have a few buttons on the page that say "Did the file come through correctly? (y/n)".
- If the user presses yes, generate a page with the next filename. If no, redo from start.

This will ensure that the user gets the files. Also, you could make a system that enables the client to get the files (even multiple times) over a weeks time, so that you can be sure that the user gets what he pays(?) for.

Unlock this solution and get a sample of our free trial.
(No credit card required)


To NeiNei: Thank you for your answer...
   Can you provide me with some example code for point one
   and the JavaScript.
   Please let me know if you need more points and eventually
   how many.

   Erot. (sorry that this took some time have been on a vacation)
Unlock the solution to this question.
Thanks for using Experts Exchange.

Please provide your email to receive a sample view!

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.


Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.