Yup...I'm afraid this isn't possible within a browser (for security reasons) but you could easily build a simple perl client that would (using LWP) make a request to a CGI and save the result locally. The problem there is the UI...If you're not using a browser to retrieve the info from a server, then you'd have to create some sort of UI within your client and since your user isn't computer savvy, that probably means using Tcl/TK (about which I know next to nothing;-) OR it means building a web-based front end for your client app which means writing your own web-server capable of CGI like behavior and showing your user how to connect to http://localhost:8008 or some such... not pretty either way.
If it isn't imperative that the user gets the file immediately, I'd build the core of the app as a CGI (with a web-based front-end for the user) which gathers the info and creates the appropriate file in a predetermined location on the server, and then I'd make a client app that sits in the background on the users' machine and checks for a new file on the server every 5 minutes (or whatever) and, if it finds a fresh copy, downloads it to a local directory. Still kinda clunky but there's no other way to force a download to a client's box without having it either initiated by the user or handled by a client-side app of some sort. Good luck! -Peter -----Original Message----- From: zentara [mailto:[EMAIL PROTECTED]] Sent: Thursday, December 12, 2002 5:36 AM To: [EMAIL PROTECTED] Subject: Re: automatically downloading files into a certain directory On Thu, 12 Dec 2002 09:21:37 +0100, [EMAIL PROTECTED] (Anette Seiler) wrote: >I want to do something where I am not sure it can be done with perl... > >Basically a user should klick on a button on a website. Then the script >should create a file with certain information from a database on the >webserver (that's easy) and that file should automatically be downloaded >into a certain directory on the user's computer (that is the difficult >part). The user is not computer illaterate, but he should not bother about >downloading and choosing certain directories (as he will have to download >hundreds of these files) and definitely not about ftp or something like that. > >Well, as I said, it is the downloading part that I don't know how to do. >Can it be done with perl or should I look at something else - maybe javascript? I don't think it can be done automatically like you want, from a web browser. It would cause too many security problems. In a web browser, the user must be asked to save anything to disk, once for each file. If you need automation of this kind, you should look into using a LWP script to automatically get the files, and keep the browser out of it. -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]