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

Writing a text file to the network

Status
Not open for further replies.

Waz816

Programmer
Oct 4, 2001
10
US
** I have posted this on the ASP board **
** Looking for more ideas **

It seems as though all the examples I've seen are of writing a text file to the local hard drive(c:). I got my app to write to the hard drive in development using:
set txtFileObj = fsoObj.OpenTextFile("c:\testfile.txt", 2, true). This works just fine.

Now that my app works the way I want it, I need to write it to the network so that another app can pick it up and use the contents. I tried to use the following line but get a
"Path not found" error.

set txtFileObj = fsoObj.OpenTextFile("n:\GROUP\Eagle\Plotting\Gas\map_file.txt", 2, true)

Any suggestions would be appreciated. Thanks.
 
Have you tried the UNC?

\\servername\sharename\etc\etc....\thefile.txt
 
Since you tried the ASP forum first, I assume you're talking about an ASP application (duh!).

But it isn't clear to me exactly what you are doing.

Is this code within your ASP page, or on the client?

If on the client you're going to have some trouble, because browser security would normally consider the FSO as "unsafe for scripting." Basically anything that client-side code might try to do that would alter the "state" of the user's machine (such as opening a local file) is AT LEAST going to pop up a security warning. And as for writing back to the server...

If on your ASP page, it should be able to do whatever the page's security context user is permitted to do. In this case I'd assume either N: isn't mapped or the ASP security context doesn't have rights to it.

But I'm just stabbing around in the dark. Maybe you can tell us a little more?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top