PDA

View Full Version : File Manipulation (Remote)


Ally
07-09-2004, 05:52 AM
This is an issue i've been grappling with for a few weeks.
This may not sound like client side but keep reading.

What it breaks down to is this.

I've got an intranet application, which runs on ASP pages, interacting with a database. That all works and is the base of the application. However as part of the process of adding things to the database i need to do a little file juggling on a SEPARATE server. That's where it gets complicated, as using the FSO object server side isnt an option because then i'd lose the security features of those folders as id have to open them up to iNetUser.

So, whether or not you understood that or care about that issue, what i need help with is some kind of client side script, (likely javascript but VB would do) with which i can manipulate files remotely. Specifically i need to copy a word document from a folder (used as a template for other documents), rename it to a name of my choosing (determined by other factors), and open the document for editing.

The biggest bonus of doing this client side is that it would retain the windows NT security system and limit folder access etc. But i'm rambling a bit here.

The main problem i've encountered however, is that in this project, i'm not allowed to download anything to the client machine beyond what comes as standard in IE6. (its always going to be IE so don't worry about compatability issues) This unfortunately includes any kind of ActiveX facilities.

Anyway im like a rat in a cage running in circles with this one. Any suggestions ?

agent002
07-09-2004, 06:15 AM
I'm sorry, but there is no way client-side (JavaScript or VBScript) can access (read & write) files on a server. They can only access files on the client's own computer, and that is using an ActiveX control. You need to have a server side (ASP) script on that remote server, JavaScript can naturally redirect the user to that URL.

Ally
07-09-2004, 10:39 AM
Well it's a shot in the dark but i don't suppose it matters if the remote server in question is actually a mapped drive on the client PC ?

agent002
07-09-2004, 10:42 AM
If the server is your own computer, then you can read and write to files, and perform some DOS commands and such, but as I said, you can only do it to your own computer. And, it requires ActiveX. And it can't probably handle databases.