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 wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

generate file and save to disk

Status
Not open for further replies.

kevpho

Programmer
Jun 9, 2003
47
CA
Hi,

I need to be able to create a text file and save it to a specific folder on the disk. There's no problem with creating the actual file, I'm just making a filesystem object ... however, I can't figure out how to allow the user of the site to specify which folder to save the file to. Preferably I would like one of those "save as" windows to open up cause that would be easiest for the end user.

A lot of the scripts I found on the net were to upload files from the hard disk to the server, and I haven't been able to find anything that could do this .. not sure if it's even possible?

This is how the script SHOULD work. The user submits a form, and on submission the computer asks the user where to save the file to (probably a protected individual folder on the network) and the name to save it as. Then the file is created.

Thanks in advance for any sort of input

Kevin
 
You cannot use the built in saveas dialogue box which shows the server paths from a client machine. It shouldnt take too long to create one yourself, just use the filesystem object to get folders and files and show it in a popup. If you need any help with that let me know.
 
Thanks for the quick reply.

I have never really used the filesystem object, except to create small files while testing so I'm not familiar with using it to get folders and files. I did find a script that allows you to select a folder on the network, but I still need to digest it.

I was hoping that I could use that saveas dialogue box but seeing as I can't, I suppose I can just use that and then have another form box for the user to enter the filename.

One question, though. How will the script know if the user is authorized to access a specific folder?

I'm gonna try it out and let you know how it goes.

Kevin
 
The user that needs permissions to any folder that you're going to write to is the IUSR_MACHINE_NAME (web user) account.
 
I've been able to create a page that shows the folder structure and allows the user to write a file to a certain path, but I have no idea how the permissions work. What do I do with the IUSR_MACHINE_NAME account?

The user is only able to access the web site's folders and not their own. Is there a way to get windows to authenticate them (The server is running Windows 2000)?

Thanks for your help

Kevin
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top