What is the equivalent to writing to the server?

  • Thread starter Thread starter Trint Smith
  • Start date Start date
T

Trint Smith

Ok, I know this is for local:
Dim sw As StreamWriter
sw = New StreamWriter("D:\files\text.txt", True)
What can I use to do the same write to the same directory, except on the
server please?
Thanks,
Trint

.Net programmer
(e-mail address removed)
 
Sure,make sure you've shared a directory on the server and you have
sufficient rights to write on that share/directory:

sw = New StreamWriter("\\ServerName\ShareName\text.txt", True)
 
* Trint Smith said:
Ok, I know this is for local:
Dim sw As StreamWriter
sw = New StreamWriter("D:\files\text.txt", True)
What can I use to do the same write to the same directory, except on the
server please?

How do you have access to the "server"?
 
Hi Trint,

Do you mean with "except on the server" that you want to write it on the
client computer?

Cor
 
Want to write it on the server...currently I'm writing it on my local
computer.

.Net programmer
(e-mail address removed)
 
Hi Trint,

But I asume you are witing with a webpage as usual, so why would this not
work on the server?

Cor
 
I just tested this and it does work on the server:
sw = New StreamWriter("\\ServerName\ShareName\text.txt", True)
This writes to the local computer:
sw = New StreamWriter("d:\files\text.txt", True)

Thanks,
Trint

.Net programmer
(e-mail address removed)
 
Back
Top