Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations MikeeOK on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Download Multiple Files at One Time

Status
Not open for further replies.

Meleagant

Programmer
Aug 31, 2001
166
US
All,

Frustrating problem where I need to be able to send multiple files down to the a client PC at one time.

My user's have their reports folder, containing...well their reports. Its just a web tree with each node being a folder on the server and each leaf is a report. When the user checks multiple items I need to be able to send those reports from the server down to their PC. I can't figure out how.

I've already looked at this article, but unless I'm missing something, this just displays each image in a image tag that you can right click and save.

I've also looked here: but it seems that I am only allowed to download one file per request.

I'm a little stumped on this one. Does anyone have any ideas? Is there a way that I can ftp all of the files to a directory on the client PC?

Thanks,
-- Joe --

* Sine scientia ars nihil est
* Respondeat superior
 
You can't download directly to their pc, the file would have to be sent/streamed to the browser, then they can decide to save it if they want.
 
That's what I was afraid of, but I did stumble on this piece of VB Script from our Classic ASP site:
Code:
Function SaveReport(Server, ServerFile, File)

	ServerFile = Replace(CStr(ServerFile), " ", "/")
	ServerFile = Replace(ServerFile,"\","/")
	ServerFile2 = Server & "/aspftp/" & ServerFile

	LocalPath = "c:\" & File     

	Set objStream = CreateObject("ADODB.Stream")
	objStream.Type = 1 ' adTypeBinary
	objStream.Open ("URL=" & ServerFile2)
	objStream.SaveToFile LocalPath, 2
	objStream.Close

End Function

This function is called from inside a javascript loop that runs around all of the checked nodes of the web tree. For each checked report (item), a call to this VBScript is made.

This works when users are inside of our network or connected on the VPN, but for outside users I don't think that this will work. That's why I was wondering if there was a better .Net way to send files to the browser.

Plus this script seems to bomb for our heavy reporting users who want to bring down 20 big files at once. I've even brought up the solution of zipping all of the files together into one archive and then sending that down to the client, but that was shot down, mainly because we don't feel confident in our users ability to use winzip (or winrar) :)

* Sine scientia ars nihil est
* Respondeat superior
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top